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



##########
File path: 
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java
##########
@@ -469,15 +478,72 @@ public boolean delete(Path f, boolean recursive) throws 
IOException {
         return false;
       }
 
+      OFSPath ofsPath = new OFSPath(key);
+

Review comment:
       Yes. Unfortunately I found that the original check is broken. we might 
just want to remove it:
   ```
   $ ozone fs -rm -r ofs://omservice/
   2020-05-14 18:51:50 INFO  deprecation:1394 - io.bytes.per.checksum is 
deprecated. Instead, use dfs.bytes-per-checksum
   2020-05-14 18:51:50 INFO  BasicRootedOzoneFileSystem:476 - delete: key =
   2020-05-14 18:51:50 WARN  BasicRootedOzoneFileSystem:488 - delete: OFS does 
not support rm root. To wipe the cluster, please re-init OM instead.
   rm: `ofs://omservice/': Input/output error
   ```
   
   `addTrailingSlashIfNeeded` doesn't really add '/' to empty string (root).
   
   also I noticed the `Input/output error` part. looking into it.




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