hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "philo vivero (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-639) dfs does not support -rmdir
Date Wed, 07 Sep 2011 02:19:10 GMT

    [ https://issues.apache.org/jira/browse/HDFS-639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098545#comment-13098545
] 

philo vivero commented on HDFS-639:
-----------------------------------

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.


> dfs does not support -rmdir
> ---------------------------
>
>                 Key: HDFS-639
>                 URL: https://issues.apache.org/jira/browse/HDFS-639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Allen Wittenauer
>            Assignee: Daryn Sharp
>            Priority: Minor
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message