smengcl commented on a change in pull request #906:
URL: https://github.com/apache/hadoop-ozone/pull/906#discussion_r425349213



##########
File path: 
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java
##########
@@ -457,6 +462,10 @@ public boolean delete(Path f, boolean recursive) throws 
IOException {
       return false;
     }
 
+    if (status == null) {
+      return false;
+    }
+
     String key = pathToKey(f);
     boolean result;
 

Review comment:
       It complies to the `FileSystem#delete` behavior: 
https://github.com/apache/hadoop/blob/263c76b678275dfff867415c71ba9dc00a9235ef/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java#L1634-L1643
   
   But yes it would be a good idea to explain delete behavior for OFS.




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



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

Reply via email to