Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-10902

Deletion of directories with snapshots will not output reason for trash move failure

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.0
    • 2.6.0
    • None
    • None

    Description

      When using trash-enabled FsShell to delete a directory that has snapshots, we se an error message saying "Failed to move to trash" but no explanation.

      [hdfs@schu-enc2 ~]$ hdfs dfs -rm -r snap
      2014-07-28 05:45:29,527 INFO  [main] fs.TrashPolicyDefault (TrashPolicyDefault.java:initialize(92)) - Namenode trash configuration: Deletion interval = 1440 minutes, Emptier interval = 0 minutes.
      rm: Failed to move to trash: hdfs://schu-enc2.vpc.com:8020/user/hdfs/snap. Consider using -skipTrash option
      

      If we use -skipTrash, then we'll get the explanation: "rm: The directory /user/hdfs/snap cannot be deleted since /user/hdfs/snap is snapshottable and already has snapshots"

      It'd be an improvement to make it clear that dirs with snapshots cannot be deleted when we're using the trash.

      Attachments

        1. HADOOP-10902.1.patch
          1 kB
          Stephen Chu

        Activity

          People

            schu Stephen Chu
            schu Stephen Chu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: