As discussed in
HADOOP-13449, proper support for the isEmptyDirectory() flag stored in S3AFileStatus is missing from DynamoDBMetadataStore.
The approach taken by LocalMetadataStore is not suitable for the DynamoDB implementation, and also sacrifices good code separation to minimize S3AFileSystem changes pre-merge to trunk.
I will attach a design doc that attempts to clearly explain the problem and preferred solution. I suggest we do this work after merging the
HADOOP-13345 branch to trunk, but am open to suggestions.
I can also attach a patch of a integration test that exercises the missing case and demonstrates a failure with DynamoDBMetadataStore.