From common-issues-return-8008-apmail-hadoop-common-issues-archive=hadoop.apache.org@hadoop.apache.org Wed May 05 08:04:31 2010 Return-Path: Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: (qmail 55963 invoked from network); 5 May 2010 08:04:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 May 2010 08:04:31 -0000 Received: (qmail 4300 invoked by uid 500); 5 May 2010 08:04:31 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 3682 invoked by uid 500); 5 May 2010 08:04:28 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 3580 invoked by uid 99); 5 May 2010 08:04:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 08:04:27 +0000 X-ASF-Spam-Status: No, hits=-1390.4 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 08:04:26 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o45846SL023690 for ; Wed, 5 May 2010 08:04:06 GMT Message-ID: <29054657.16541273046646158.JavaMail.jira@thor> Date: Wed, 5 May 2010 04:04:06 -0400 (EDT) From: "Vinod K V (JIRA)" To: common-issues@hadoop.apache.org Subject: [jira] Commented: (HADOOP-6631) FileUtil.fullyDelete() should continue to delete other files despite failure at any level. In-Reply-To: <615835698.224041268388087233.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-6631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864225#action_12864225 ] Vinod K V commented on HADOOP-6631: ----------------------------------- We will need a test to verify the non-deletable file case. Talked to Ravi and he came out with a brilliant idea and pointed out it CAN be done deterministically by checking the case where we want to continue deletion of files under dir/subdirectory even if the files or subdirectories under a dir can not be deleted. I'm trying to get this testcase done myself.. > FileUtil.fullyDelete() should continue to delete other files despite failure at any level. > ------------------------------------------------------------------------------------------ > > Key: HADOOP-6631 > URL: https://issues.apache.org/jira/browse/HADOOP-6631 > Project: Hadoop Common > Issue Type: Bug > Components: fs, util > Reporter: Vinod K V > Assignee: Ravi Gummadi > Fix For: 0.22.0 > > Attachments: hadoop-6631-y20s-1.patch, hadoop-6631-y20s-2.patch, HADOOP-6631.patch, HADOOP-6631.patch, HADOOP-6631.v1.patch > > > Ravi commented about this on HADOOP-6536. Paraphrasing... > Currently FileUtil.fullyDelete(myDir) comes out stopping deletion of other files/directories if it is unable to delete a file/dir(say because of not having permissions to delete that file/dir) anywhere under myDir. This is because we return from method if the recursive call "if(!fullyDelete()) {return false;}" fails at any level of recursion. > Shouldn't it continue with deletion of other files/dirs continuing in the for loop instead of returning false here ? > I guess fullyDelete() should delete as many files as possible(similar to 'rm -rf'). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.