[ 
https://issues.apache.org/jira/browse/HADOOP-15845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646633#comment-16646633
 ] 

Steve Loughran commented on HADOOP-15845:
-----------------------------------------

{code}
bin/hadoop s3guard init 
2018-10-11 16:29:27,391 [main] INFO  s3guard.DynamoDBMetadataStore 
(DynamoDBMetadataStore.java:createTable(1365)) - Creating non-existent DynamoDB 
table shared-table in region eu-west-1
2018-10-11 16:30:38,224 [main] INFO  s3guard.S3GuardTool 
(S3GuardTool.java:initMetadataStore(273)) - Metadata store 
DynamoDBMetadataStore{region=eu-west-1, tableName=shared-table, tableArn=null} 
is initialized.
Metadata Store Diagnostics:
        ARN=arn:aws:dynamodb:eu-west-1:980678866538:table/shared-table
        description=S3Guard metadata store in DynamoDB
        name=shared-table
        persist.authoritative.bit=true
        read-capacity=500
        region=eu-west-1
        retryPolicy=ExponentialBackoffRetry(maxRetries=9, sleepTime=250 
MILLISECONDS)
        size=0
        status=ACTIVE
        table={AttributeDefinitions: [{AttributeName: child,AttributeType: S}, 
{AttributeName: parent,AttributeType: S}],TableName: shared-table,KeySchema: 
[{AttributeName: parent,KeyType: HASH}, {AttributeName: child,KeyType: 
RANGE}],TableStatus: ACTIVE,CreationDateTime: Thu Oct 11 16:29:27 BST 
2018,ProvisionedThroughput: {NumberOfDecreasesToday: 0,ReadCapacityUnits: 
500,WriteCapacityUnits: 100},TableSizeBytes: 0,ItemCount: 0,TableArn: 
arn:aws:dynamodb:eu-west-1:980678866538:table/shared-table,TableId: 
e52c8e87-dafa-4fa9-9642-98b4a90e4b73,}
        write-capacity=100
{code}

> s3guard init and destroy command will create/destroy tables if ddb.table & 
> region are set
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-15845
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15845
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.1.1
>            Reporter: Steve Loughran
>            Priority: Major
>
> If you have s3guard set up with a table name and a region, then s3guard init 
> will automatically create the table, without you specifying a bucket or URI.
> I had expected the command just to print out its arguments, but it actually 
> did the init with the default bucket values
> Even worse, `hadoop s3guard destroy` will destroy the table. 
> This is too dangerous to allow. The command must require either the name of a 
> bucket or an an explicit ddb table URI



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to