Hadoop Common
  1. Hadoop Common
  2. HADOOP-10902

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.6.0
    • Component/s: None
    • Labels:
      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.

        Activity

        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Andrew Wang made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 2.6.0 [ 12327179 ]
        Resolution Fixed [ 1 ]
        Stephen Chu made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Target Version/s 3.0.0, 2.6.0 [ 12320357, 12327179 ]
        Stephen Chu made changes -
        Attachment HADOOP-10902.1.patch [ 12658594 ]
        Stephen Chu made changes -
        Field Original Value New Value
        Project Hadoop HDFS [ 12310942 ] Hadoop Common [ 12310240 ]
        Key HDFS-6760 HADOOP-10902
        Affects Version/s 2.4.0 [ 12326144 ]
        Affects Version/s 2.4.0 [ 12326143 ]
        Stephen Chu created issue -

          People

          • Assignee:
            Stephen Chu
            Reporter:
            Stephen Chu
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development