bgaborg commented on a change in pull request #628: HADOOP-16186. NPE in 
ITestS3AFileSystemContract teardown in DynamoDBMetadataStore.lambda$listChildren
URL: https://github.com/apache/hadoop/pull/628#discussion_r268189294
 
 

 ##########
 File path: 
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/DynamoDBMetadataStore.java
 ##########
 @@ -647,9 +650,19 @@ public DirListingMetadata listChildren(final Path path) 
throws IOException {
           LOG.trace("Listing table {} in region {} for {} returning {}",
               tableName, region, path, metas);
 
-          return (metas.isEmpty() && dirPathMeta == null)
-              ? null
-              : new DirListingMetadata(path, metas, isAuthoritative,
+          if (!metas.isEmpty() && dirPathMeta == null) {
+            // We handle this case as the directory is deleted.
+            LOG.warn("Directory metadata is null, but the list of the "
 
 Review comment:
   Something like:
   > Directory marker is deleted, but the list of the directory elements is not 
empty: {}. This case is handled as the directory is deleted.
   It would be better?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to