Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-5901

Delete on volume/bucket throws fatal error on ofs

    XMLWordPrintableJSON

Details

    Description

      Recursive delete

      ozone fs -rm -R ofs://ozone1/absdf
      

      on a volume or bucket gives the following fatal error as no trash is configured at root level.

      -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:727)
      	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)
      	at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:331)
      	at org.apache.hadoop.fs.shell.Command.processPathArgument(Command.java:304)
      	at org.apache.hadoop.fs.shell.Command.processArgument(Command.java:286)
      	at org.apache.hadoop.fs.shell.Command.processArguments(Command.java:270)
      	at org.apache.hadoop.fs.shell.FsCommand.processRawArguments(FsCommand.java:120)
      	at org.apache.hadoop.fs.shell.Command.run(Command.java:177)
      	at org.apache.hadoop.fs.FsShell.run(FsShell.java:328)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
      	at org.apache.hadoop.fs.ozone.OzoneFsShell.main(OzoneFsShell.java:81)
      

      This problem has been handled when the Trash policy is TrashPolicyOzone (in HDDS-5175), but not for TrashPolicyDefault. A possible solution is to make TrashPolicyOzone the default Trash policy.

      Attachments

        Issue Links

          Activity

            People

              siddhant Siddhant Sangwan
              soumdmw Soumitra Sulav (Old)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: