steveloughran commented on a change in pull request #1707: HADOOP-16697. 
Tune/audit auth mode
URL: https://github.com/apache/hadoop/pull/1707#discussion_r352143307
 
 

 ##########
 File path: 
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/DynamoDBMetadataStore.java
 ##########
 @@ -748,7 +757,22 @@ private DDBPathMetadata innerGet(Path path, boolean 
wantEmptyDirectoryFlag)
         boolean hasChildren = readOp.retry("get/hasChildren",
             path.toString(),
             true,
-            () -> table.query(spec).iterator().hasNext());
+            () -> {
+              // issue the query
+              final IteratorSupport<Item, QueryOutcome> it = table.query(
+                  spec).iterator();
+              // if non empty, log the result to aid with some debugging
+              if (it.hasNext()) {
+                if (LOG.isDebugEnabled()) {
+                  LOG.debug("Dir {} is non-empty", status.getPath());
+                  while(it.hasNext()) {
+                    LOG.debug("{}", itemToPathMetadata(it.next(), username));
 
 Review comment:
   
   Yes, I need to debug why a newly created directory was being considered 
nonempty. It turns out if your store is in a mess and there is an orphan entry 
for a child in the table, when you add the new directory it is automatically 
non-empty, which breaks the rename tests. I am not going to fix it here -I 
don't even know what fix- I just purged that entire bit of the directory tree. 
Note: prune doesn't work as it prunes leaves only; I had to use the secret 
entry point for purging.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to