[
https://issues.apache.org/jira/browse/HADOOP-16393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16872489#comment-16872489
]
Steve Loughran commented on HADOOP-16393:
-----------------------------------------
This leads to a fun failure. You can't instantiate a store because its bucket
doesn't exist:
{code}
bin/hadoop s3guard bucket-info s3a://hwdev-steve-london/
2019-06-25 17:17:38,099 [main] DEBUG s3guard.S3GuardTool
(S3GuardTool.java:run(1623)) - Executing command bucket-info
2019-06-25 17:17:38,441 [main] DEBUG s3a.S3AFileSystem
(S3AFileSystem.java:initialize(291)) - Initializing S3AFileSystem for
hwdev-steve-london
2019-06-25 17:17:38,453 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:propagateBucketOptions(1136)) - Propagating entries under
fs.s3a.bucket.hwdev-steve-london.
2019-06-25 17:17:38,455 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:propagateBucketOptions(1157)) - Updating
fs.s3a.s3guard.ddb.table from [core-site.xml]
2019-06-25 17:17:38,456 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:propagateBucketOptions(1157)) - Updating
fs.s3a.change.detection.source from [core-site.xml]
2019-06-25 17:17:38,456 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:propagateBucketOptions(1157)) - Updating fs.s3a.ddb.region from
[core-site.xml]
2019-06-25 17:17:38,456 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:propagateBucketOptions(1157)) - Updating
fs.s3a.server-side-encryption-algorithm from [core-site.xml]
2019-06-25 17:17:38,456 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:propagateBucketOptions(1157)) - Updating
fs.s3a.metadatastore.impl from [core-site.xml]
2019-06-25 17:17:38,456 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:propagateBucketOptions(1157)) - Updating fs.s3a.versioned.store
from [core-site.xml]
2019-06-25 17:17:38,456 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:propagateBucketOptions(1157)) - Updating
fs.s3a.metadatastore.authoritative from [core-site.xml]
2019-06-25 17:17:38,624 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.paging.maximum is 5000
2019-06-25 17:17:38,625 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:longBytesOption(1022)) - Value of fs.s3a.block.size is 33554432
2019-06-25 17:17:38,625 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:longBytesOption(1022)) - Value of fs.s3a.readahead.range is
524288
2019-06-25 17:17:38,625 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.max.total.tasks is 32
2019-06-25 17:17:38,626 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:longOption(1000)) - Value of fs.s3a.threads.keepalivetime is 60
2019-06-25 17:17:38,629 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.executor.capacity is 16
2019-06-25 17:17:38,645 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:createAWSCredentialProvider(710)) - Credential provider class is
org.apache.hadoop.fs.s3a.TemporaryAWSCredentialsProvider
2019-06-25 17:17:38,645 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:createAWSCredentialProvider(710)) - Credential provider class is
org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider
2019-06-25 17:17:38,646 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:createAWSCredentialProvider(710)) - Credential provider class is
com.amazonaws.auth.EnvironmentVariableCredentialsProvider
2019-06-25 17:17:38,646 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:createAWSCredentialProvider(710)) - Credential provider class is
org.apache.hadoop.fs.s3a.auth.IAMInstanceCredentialsProvider
2019-06-25 17:17:38,647 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:createAWSCredentialProviderSet(609)) - For URI
s3a://hwdev-steve-london/, using credentials
AWSCredentialProviderList[refcount= 1: [TemporaryAWSCredentialsProvider,
SimpleAWSCredentialsProvider, EnvironmentVariableCredentialsProvider,
org.apache.hadoop.fs.s3a.auth.IAMInstanceCredentialsProvider@41fecb8b]
2019-06-25 17:17:38,647 [main] DEBUG s3a.S3AFileSystem
(S3AFileSystem.java:bindAWSClient(527)) - Using credential provider
AWSCredentialProviderList[refcount= 1: [TemporaryAWSCredentialsProvider,
SimpleAWSCredentialsProvider, EnvironmentVariableCredentialsProvider,
org.apache.hadoop.fs.s3a.auth.IAMInstanceCredentialsProvider@41fecb8b]
2019-06-25 17:17:38,863 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.connection.maximum is 48
2019-06-25 17:17:38,863 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.attempts.maximum is 8
2019-06-25 17:17:38,863 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.connection.establish.timeout
is 5000
2019-06-25 17:17:38,863 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.connection.timeout is 5000
2019-06-25 17:17:38,863 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.socket.send.buffer is 65536
2019-06-25 17:17:38,864 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.socket.recv.buffer is 32678
2019-06-25 17:17:38,866 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:initUserAgent(1323)) - Using User-Agent: Hadoop
3.1.1.7.0.0.0-SNAPSHOT
2019-06-25 17:17:39,255 [main] DEBUG s3a.AWSCredentialProviderList
(AWSCredentialProviderList.java:getCredentials(197)) - No credentials from
TemporaryAWSCredentialsProvider:
org.apache.hadoop.fs.s3a.auth.NoAwsCredentialsException: Session credentials in
Hadoop configuration: No AWS Credentials
2019-06-25 17:17:39,256 [main] DEBUG s3a.AWSCredentialProviderList
(AWSCredentialProviderList.java:getCredentials(184)) - Using credentials from
SimpleAWSCredentialsProvider
2019-06-25 17:17:40,247 [main] DEBUG s3a.S3AFileSystem
(S3AFileSystem.java:initialize(367)) - Input fadvise policy = normal
2019-06-25 17:17:40,251 [main] DEBUG s3a.S3AFileSystem
(S3AFileSystem.java:initialize(369)) - Change detection policy =
VersionIdChangeDetectionPolicy mode=Server
2019-06-25 17:17:40,251 [main] DEBUG s3a.S3AFileSystem
(S3AFileSystem.java:initialize(373)) - Filesystem support for magic committers
is enabled
2019-06-25 17:17:40,256 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.fast.upload.active.blocks is 4
2019-06-25 17:17:40,256 [main] DEBUG s3a.S3AFileSystem
(S3AFileSystem.java:initialize(392)) - Using S3ABlockOutputStream with buffer =
disk; block=8388608; queue limit=4
2019-06-25 17:17:40,258 [main] DEBUG s3guard.S3Guard
(S3Guard.java:getMetadataStoreClass(133)) - Metastore option source
[fs.s3a.bucket.hwdev-steve-london.metadatastore.impl via [core-site.xml]]
2019-06-25 17:17:40,266 [main] DEBUG s3guard.S3Guard
(S3Guard.java:getMetadataStore(105)) - Using DynamoDBMetadataStore metadata
store for s3a filesystem
2019-06-25 17:17:40,267 [main] DEBUG s3guard.DynamoDBMetadataStore
(DynamoDBMetadataStore.java:initialize(393)) - Overriding S3 region with
configured DynamoDB region: eu-west-1
2019-06-25 17:17:40,267 [main] DEBUG s3a.S3AFileSystem
(S3AFileSystem.java:shareCredentials(4038)) - Sharing credentials for: s3guard
2019-06-25 17:17:40,268 [main] DEBUG s3guard.DynamoDBMetadataStore
(DynamoDBMetadataStore.java:createDynamoDB(367)) - Creating DynamoDB client
class
org.apache.hadoop.fs.s3a.s3guard.DynamoDBClientFactory$DefaultDynamoDBClientFactory
with S3 region eu-west-1
2019-06-25 17:17:40,268 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.connection.maximum is 48
2019-06-25 17:17:40,268 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.attempts.maximum is 8
2019-06-25 17:17:40,268 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.connection.establish.timeout
is 5000
2019-06-25 17:17:40,268 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.connection.timeout is 5000
2019-06-25 17:17:40,269 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.socket.send.buffer is 65536
2019-06-25 17:17:40,269 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:intOption(979)) - Value of fs.s3a.socket.recv.buffer is 32678
2019-06-25 17:17:40,269 [main] DEBUG s3a.S3AUtils
(S3AUtils.java:initUserAgent(1323)) - Using User-Agent: Hadoop
3.1.1.7.0.0.0-SNAPSHOT
2019-06-25 17:17:40,269 [main] DEBUG s3guard.DynamoDBClientFactory
(DynamoDBClientFactory.java:createDynamoDBClient(86)) - Creating DynamoDB
client in region eu-west-1
2019-06-25 17:17:40,324 [main] DEBUG s3guard.DynamoDBMetadataStore
(DynamoDBMetadataStore.java:initTable(1666)) - Binding to table
s3guard-hwdev-steve-london
java.io.FileNotFoundException: DynamoDB table 's3guard-hwdev-steve-london' does
not exist in region eu-west-1; auto-creation is turned off
2019-06-25 17:17:40,659 [main] DEBUG s3guard.S3GuardTool
(S3GuardTool.java:main(1680)) - Not found:
java.io.FileNotFoundException: DynamoDB table 's3guard-hwdev-steve-london' does
not exist in region eu-west-1; auto-creation is turned off
at
org.apache.hadoop.fs.s3a.s3guard.DynamoDBMetadataStore.initTable(DynamoDBMetadataStore.java:1724)
at
org.apache.hadoop.fs.s3a.s3guard.DynamoDBMetadataStore.initialize(DynamoDBMetadataStore.java:423)
at
org.apache.hadoop.fs.s3a.s3guard.S3Guard.getMetadataStore(S3Guard.java:107)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.initialize(S3AFileSystem.java:399)
at
org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3315)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:136)
at
org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3364)
at org.apache.hadoop.fs.FileSystem$Cache.getUnique(FileSystem.java:3338)
at org.apache.hadoop.fs.FileSystem.newInstance(FileSystem.java:544)
at
org.apache.hadoop.fs.s3a.s3guard.S3GuardTool$BucketInfo.run(S3GuardTool.java:1167)
at
org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.run(S3GuardTool.java:400)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at
org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.run(S3GuardTool.java:1659)
at
org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.main(S3GuardTool.java:1668)
Caused by: com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException:
Requested resource not found: Table: s3guard-hwdev-steve-london not found
(Service: AmazonDynamoDBv2; Status Code: 400; Error Code:
ResourceNotFoundException; Request ID:
QMIJQCCUI6UU2A93D43M3DSSF7VV4KQNSO5AEMVJF66Q9ASUAAJG)
at
com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1712)
at
com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1367)
at
com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1113)
at
com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:770)
at
com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:744)
at
com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:726)
at
com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:686)
at
com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:668)
at
com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:532)
at
com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:512)
at
com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.doInvoke(AmazonDynamoDBClient.java:4279)
at
com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.invoke(AmazonDynamoDBClient.java:4246)
at
com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.executeDescribeTable(AmazonDynamoDBClient.java:1905)
at
com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.describeTable(AmazonDynamoDBClient.java:1871)
at
com.amazonaws.services.dynamodbv2.document.Table.describe(Table.java:137)
at
org.apache.hadoop.fs.s3a.s3guard.DynamoDBMetadataStore.initTable(DynamoDBMetadataStore.java:1667)
... 13 more
2019-06-25 17:17:40,661 [main] INFO util.ExitUtil
(ExitUtil.java:terminate(210)) - Exiting with status 44:
java.io.FileNotFoundException: DynamoDB table 's3guard-hwdev-steve-london' does
not exist in region eu-west-1; auto-creation is turned off
{code}
> S3Guard init command uses global settings, not those of target bucket
> ---------------------------------------------------------------------
>
> Key: HADOOP-16393
> URL: https://issues.apache.org/jira/browse/HADOOP-16393
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 3.2.0
> Reporter: Steve Loughran
> Priority: Major
>
> If you call {{s3guard init s3a://name/}} then the custom bucket options of
> fs.s3a.bucket.name are not picked up, instead the global value is used.
> Fix: take the name of the bucket and use that to eval properties and patch
> the config used for the init command.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]