Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Given we have a mkdir, we should have a rmdir. Using rmr is not a reasonable substitute when you only want to delete empty directories.

        Issue Links

          Activity

          Allen Wittenauer created issue -
          Daryn Sharp made changes -
          Field Original Value New Value
          Assignee Daryn Sharp [ daryn ]
          Daryn Sharp made changes -
          Link This issue is part of HADOOP-7209 [ HADOOP-7209 ]
          Hide
          Daryn Sharp added a comment -

          this has been requested by pig project

          Show
          Daryn Sharp added a comment - this has been requested by pig project
          Hide
          Daryn Sharp added a comment -

          This is actually change in hadoop core. Existing jira is HADOOP-6385.

          Show
          Daryn Sharp added a comment - This is actually change in hadoop core. Existing jira is HADOOP-6385 .
          Daryn Sharp made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Invalid [ 6 ]
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #700 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/700/)
          HADOOP-6385. dfs should support -rmdir (was HDFS-639). Contributed by Daryn Sharp.

          mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150987
          Files :

          • /hadoop/common/trunk/common/src/test/core/org/apache/hadoop/cli/testConf.xml
          • /hadoop/common/trunk/common/CHANGES.txt
          • /hadoop/common/trunk/common/src/java/org/apache/hadoop/fs/shell/Delete.java
          • /hadoop/common/trunk/common/src/java/org/apache/hadoop/fs/shell/PathExceptions.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #700 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/700/ ) HADOOP-6385 . dfs should support -rmdir (was HDFS-639 ). Contributed by Daryn Sharp. mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150987 Files : /hadoop/common/trunk/common/src/test/core/org/apache/hadoop/cli/testConf.xml /hadoop/common/trunk/common/CHANGES.txt /hadoop/common/trunk/common/src/java/org/apache/hadoop/fs/shell/Delete.java /hadoop/common/trunk/common/src/java/org/apache/hadoop/fs/shell/PathExceptions.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk #758 (See https://builds.apache.org/job/Hadoop-Common-trunk/758/)
          HADOOP-6385. dfs should support -rmdir (was HDFS-639). Contributed by Daryn Sharp.

          mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150987
          Files :

          • /hadoop/common/trunk/common/src/test/core/org/apache/hadoop/cli/testConf.xml
          • /hadoop/common/trunk/common/CHANGES.txt
          • /hadoop/common/trunk/common/src/java/org/apache/hadoop/fs/shell/Delete.java
          • /hadoop/common/trunk/common/src/java/org/apache/hadoop/fs/shell/PathExceptions.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk #758 (See https://builds.apache.org/job/Hadoop-Common-trunk/758/ ) HADOOP-6385 . dfs should support -rmdir (was HDFS-639 ). Contributed by Daryn Sharp. mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150987 Files : /hadoop/common/trunk/common/src/test/core/org/apache/hadoop/cli/testConf.xml /hadoop/common/trunk/common/CHANGES.txt /hadoop/common/trunk/common/src/java/org/apache/hadoop/fs/shell/Delete.java /hadoop/common/trunk/common/src/java/org/apache/hadoop/fs/shell/PathExceptions.java
          Hide
          philo vivero added a comment -

          The lack of this feature just caused us to lose huge amounts of data in our production HDFS. Because of a bug in a script, it did a "hadoop fs -rmr /user/hive/warehouse/$variable" when $variable was blank. Its goal, really, was to rmdir /user/hive/warehouse/$variable, and those semantics would have worked under normal conditions, and died under pathological conditions.

          The rmr semantics mean the script thinks it succeeded at its task when in fact, it wiped out our cluster. Now I need to spend the rest of my evening restoring from backups (which were, thankfully, not in HDFS).

          Could we implement rmdir? It removes the directory iff the directory is empty. This is a far less dangerous operation in the face of scripts with badly-initialised variables.

          Show
          philo vivero added a comment - The lack of this feature just caused us to lose huge amounts of data in our production HDFS. Because of a bug in a script, it did a "hadoop fs -rmr /user/hive/warehouse/$variable" when $variable was blank. Its goal, really, was to rmdir /user/hive/warehouse/$variable, and those semantics would have worked under normal conditions, and died under pathological conditions. The rmr semantics mean the script thinks it succeeded at its task when in fact, it wiped out our cluster. Now I need to spend the rest of my evening restoring from backups (which were, thankfully, not in HDFS). Could we implement rmdir? It removes the directory iff the directory is empty. This is a far less dangerous operation in the face of scripts with badly-initialised variables.
          Hide
          philo vivero added a comment -

          Sorry, somehow failed to get these latter notes. I'll look for the fix in next rev of the cluster.

          Show
          philo vivero added a comment - Sorry, somehow failed to get these latter notes. I'll look for the fix in next rev of the cluster.

            People

            • Assignee:
              Daryn Sharp
              Reporter:
              Allen Wittenauer
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development