[
https://issues.apache.org/jira/browse/HADOOP-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497010
]
Sameer Paranjpye commented on HADOOP-771:
-----------------------------------------
> If we get rid of recursive deletion then we'll still have a method somewhere
> that implements recursive deletion and folks will still call it and things
> will still get unintentionally
> deleted. I don't think that's the solution here.
I agree, even if we prohibit recursive deletion at the Namenode it'll get
implemented in a library and called nonetheless. One might be able to abort a
deletion in flight, but I don't believe that a user could react quickly enough
to a mistaken deletion. The increase in the number of Namenode RPCs is an
additional problem.
Hairong's suggestion for a boolean flag specifying recursion would be a good
way to go, it would require programmers to be explicit about recursion and
avoid additional RPC traffic.
> Namenode should return error when trying to delete non-empty directory
> ----------------------------------------------------------------------
>
> Key: HADOOP-771
> URL: https://issues.apache.org/jira/browse/HADOOP-771
> Project: Hadoop
> Issue Type: Improvement
> Components: dfs
> Affects Versions: 0.8.0
> Environment: all
> Reporter: Milind Bhandarkar
> Assigned To: Sameer Paranjpye
>
> Currently, the namenode.delete() method allows recursive deletion of a
> directory. That is, even a non-empty directory could be deleted using
> namenode.delete(). To avoid costly programmer errors, the namenode should not
> remove the non-empty directories in this method. Recursively deleting
> directory should either be performed with listPaths() followed by a delete()
> for every path, or with a specific namenode method such as deleteRecursive().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.