Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
ozone fs shell rm -R at bucket level throws exception when trash service active eg.
for ofs:
$ bin/ozone fs -rm -R /vol1/bucket1
-rm: Fatal internal error java.lang.RuntimeException: Volume or bucket doesn't have trash root. at org.apache.hadoop.ozone.OFSPath.getTrashRoot(OFSPath.java:298) at org.apache.hadoop.fs.ozone.BasicRootedOzoneFileSystem.getTrashRoot(BasicRootedOzoneFileSystem.java:690) at org.apache.hadoop.fs.TrashPolicyDefault.moveToTrash(TrashPolicyDefault.java:134) at org.apache.hadoop.fs.Trash.moveToTrash(Trash.java:110) at org.apache.hadoop.fs.Trash.moveToAppropriateTrash(Trash.java:96) at org.apache.hadoop.fs.shell.Delete$Rm.moveToTrash(Delete.java:153) at org.apache.hadoop.fs.shell.Delete$Rm.processPath(Delete.java:118) at org.apache.hadoop.fs.shell.Command.processPathInternal(Command.java:367)
and for o3fs:
$ bin/ozone fs -rm -R o3fs://bucket1.vol1
-rm: Fatal internal error java.lang.NullPointerException at org.apache.hadoop.fs.Path.mergePaths(Path.java:277) at org.apache.hadoop.fs.TrashPolicyDefault.makeTrashRelativePath(TrashPolicyDefault.java:113) at org.apache.hadoop.fs.TrashPolicyDefault.moveToTrash(TrashPolicyDefault.java:146) at org.apache.hadoop.fs.Trash.moveToTrash(Trash.java:110) at org.apache.hadoop.fs.Trash.moveToAppropriateTrash(Trash.java:96) at org.apache.hadoop.fs.shell.Delete$Rm.moveToTrash(Delete.java:153) at org.apache.hadoop.fs.shell.Delete$Rm.processPath(Delete.java:118) at org.apache.hadoop.fs.shell.Command.processPathInternal(Command.java:367)
Will handle cases as if -skipTrash option is applied.
Attachments
Issue Links
- links to