rakeshadr commented on a change in pull request #3175:
URL: https://github.com/apache/ozone/pull/3175#discussion_r827241318



##########
File path: 
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java
##########
@@ -489,6 +532,29 @@ private boolean innerDelete(Path f, boolean recursive) 
throws IOException {
     }
   }
 
+  /**
+   * Deletes the children of the bucket i.e all files and dirs under it's
+   * path by iterating though th DeleteIteratorWithFSO.
+   *
+   * @param f directory path to be deleted
+   * @return true if successfully deletes all required keys, false otherwise
+   * @throws IOException
+   */
+  private boolean recursiveBucketDelete(Path f, boolean recursive)
+      throws IOException {
+    LOG.trace("delete() path:{}", f);
+    try {
+      DeleteIteratorWithFSO iterator = new DeleteIteratorWithFSO(f, recursive);

Review comment:
       @sadanand48 Instead of iterating and deleting keys one-by-one, how about 
will add immediate(under the given bucket) parent directories to 
`DirectoryDeletingService` and files to `KeyDeletingService` for doing an async 
cleanup and then delete the bucket directly?

##########
File path: 
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java
##########
@@ -489,6 +532,29 @@ private boolean innerDelete(Path f, boolean recursive) 
throws IOException {
     }
   }
 
+  /**
+   * Deletes the children of the bucket i.e all files and dirs under it's
+   * path by iterating though th DeleteIteratorWithFSO.
+   *
+   * @param f directory path to be deleted
+   * @return true if successfully deletes all required keys, false otherwise
+   * @throws IOException
+   */
+  private boolean recursiveBucketDelete(Path f, boolean recursive)
+      throws IOException {
+    LOG.trace("delete() path:{}", f);
+    try {
+      DeleteIteratorWithFSO iterator = new DeleteIteratorWithFSO(f, recursive);

Review comment:
       @sadanand48 Instead of iterating and deleting keys one-by-one, how about 
will add immediate(under the given bucket) parent directories to 
`DirectoryDeletingService` and files to `KeyDeletingService` for doing an async 
cleanup and then delete the bucket directly?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to