You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "dhruba borthakur (JIRA)" <ji...@apache.org> on 2008/03/04 10:13:50 UTC

[jira] Commented: (HADOOP-771) Namenode should return error when trying to delete non-empty directory

    [ https://issues.apache.org/jira/browse/HADOOP-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574894#action_12574894 ] 

dhruba borthakur commented on HADOOP-771:
-----------------------------------------

I think we should deprecate NameNode.delete(path) and DFSClient.delete(Path) as well. The callers have to use the new API that explicitly sets the "recursive" flag. We should remove FSNamesystem.delete(Path) altogether. Otherwise code looks good. +1.

> 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 Core
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.8.0
>         Environment: all
>            Reporter: Milind Bhandarkar
>            Assignee: Mahadev konar
>         Attachments: Hadoop-771_2.patch, Hadoop-771_3.patch, patch_771_1.patch
>
>
> 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.