Return-Path: Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: (qmail 73186 invoked from network); 2 Aug 2010 05:38:43 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Aug 2010 05:38:43 -0000 Received: (qmail 18577 invoked by uid 500); 2 Aug 2010 05:38:43 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 18441 invoked by uid 500); 2 Aug 2010 05:38:41 -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 18433 invoked by uid 99); 2 Aug 2010 05:38:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 05:38:40 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 05:38:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o725cGeJ027247 for ; Mon, 2 Aug 2010 05:38:16 GMT Message-ID: <15708894.113141280727496179.JavaMail.jira@thor> Date: Mon, 2 Aug 2010 01:38:16 -0400 (EDT) From: "Owen O'Malley (JIRA)" To: common-issues@hadoop.apache.org Subject: [jira] Commented: (HADOOP-6893) FileContext needs a method to test for existence of a file or directory. In-Reply-To: <12314272.113111280726899551.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894465#action_12894465 ] Owen O'Malley commented on HADOOP-6893: --------------------------------------- I see now that there is a Util method that checks exist, but it still uses getFileStatus and catches the exception. There should be some way of asking an AbstractFileSystem whether a name exists that doesn't throw an exception. > FileContext needs a method to test for existence of a file or directory. > ------------------------------------------------------------------------ > > Key: HADOOP-6893 > URL: https://issues.apache.org/jira/browse/HADOOP-6893 > Project: Hadoop Common > Issue Type: New Feature > Components: fs > Reporter: Owen O'Malley > > FileContext is missing a method to ask if a file or directory exists. Currently the only mechanism is to use getFileStatus, which throws an exception if the file doesn't exist, which I don't think is an appropriate use of that method. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.