Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 17244 invoked from network); 4 Mar 2008 09:15:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2008 09:15:02 -0000 Received: (qmail 7733 invoked by uid 500); 4 Mar 2008 09:14:57 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 7723 invoked by uid 500); 4 Mar 2008 09:14:57 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 7714 invoked by uid 99); 4 Mar 2008 09:14:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 01:14:57 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 09:14:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8201F234C089 for ; Tue, 4 Mar 2008 01:13:50 -0800 (PST) Message-ID: <561005756.1204622030531.JavaMail.jira@brutus> Date: Tue, 4 Mar 2008 01:13:50 -0800 (PST) From: "dhruba borthakur (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-771) Namenode should return error when trying to delete non-empty directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.