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

ozone fs trash service does not handle bucket -rm -R

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.2.0
    • 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

          Activity

            People

              NeilJoshi Neil Joshi
              NeilJoshi Neil Joshi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: