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

Mingliang Liu edited comment on HADOOP-13877 at 1/6/17 6:36 AM:
----------------------------------------------------------------

Thanks [~fabbri] for attaching the exception stack and a working patch.

I see what's happening here. In unit test, we assume the table name is not 
overridden by the config key, and default is the bucket name. I think the 
following fix should also work just fine:
{code:title=hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/s3guard/TestDynamoDBMetadataStore.java}
@@ -153,6 +153,7 @@ public static void tearDownAfterClass() throws Exception {
       conf.set(Constants.ACCESS_KEY, "dummy-access-key");
       conf.set(Constants.SECRET_KEY, "dummy-secret-key");
       conf.set(Constants.S3GUARD_DDB_ENDPOINT_KEY, ddbEndpoint);
+      conf.set(Constants.S3GUARD_DDB_TABLE_NAME_KEY, BUCKET);
       conf.setBoolean(Constants.S3GUARD_DDB_TABLE_CREATE_KEY, true);
 
       // always create new file system object for a test contract
{code}


was (Author: liuml07):
Thanks [~fabbri] for attaching the exception stack and a working patch.

I see what's happening here. In unit test, we assume the table name is not 
overridden by the config key, and default is the bucket name. I think the 
following fix should work just fine:
{code:title=hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/s3guard/TestDynamoDBMetadataStore.java}
@@ -153,6 +153,7 @@ public static void tearDownAfterClass() throws Exception {
       conf.set(Constants.ACCESS_KEY, "dummy-access-key");
       conf.set(Constants.SECRET_KEY, "dummy-secret-key");
       conf.set(Constants.S3GUARD_DDB_ENDPOINT_KEY, ddbEndpoint);
+      conf.set(Constants.S3GUARD_DDB_TABLE_NAME_KEY, BUCKET);
       conf.setBoolean(Constants.S3GUARD_DDB_TABLE_CREATE_KEY, true);
 
       // always create new file system object for a test contract
{code}

> S3Guard: fix TestDynamoDBMetadataStore when fs.s3a.s3guard.ddb.table is set
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-13877
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13877
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: HADOOP-13345
>            Reporter: Aaron Fabbri
>            Assignee: Aaron Fabbri
>         Attachments: HADOOP-13877-HADOOP-13345.001.patch
>
>
> I see a couple of failures in the DynamoDB MetadataStore unit test when I set 
> {{fs.s3a.s3guard.ddb.table}} in my test/resources/core-site.xml.
> I have a fix already, so I'll take this JIRA.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to