Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 741684904 for ; Thu, 2 Jun 2011 19:46:31 +0000 (UTC) Received: (qmail 63883 invoked by uid 500); 2 Jun 2011 19:46:31 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 63816 invoked by uid 500); 2 Jun 2011 19:46:31 -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 63650 invoked by uid 99); 2 Jun 2011 19:46:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jun 2011 19:46:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jun 2011 19:46:28 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CB3FBF0F27 for ; Thu, 2 Jun 2011 19:45:47 +0000 (UTC) Date: Thu, 2 Jun 2011 19:45:47 +0000 (UTC) From: "Jakob Homan (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <98325961.63950.1307043947829.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <958686885.62073.1306995407750.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HADOOP-7352) Contracts of LocalFileSystem and DistributedFileSystem should require FileSystem::listStatus throw IOException not return null upon access error 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-7352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043014#comment-13043014 ] Jakob Homan commented on HADOOP-7352: ------------------------------------- It's correct to make the contract consistent. Trying to make IOExceptions useful at this point is probably a lost cause. Otherwise, the changes proposed sound reasonable. > Contracts of LocalFileSystem and DistributedFileSystem should require FileSystem::listStatus throw IOException not return null upon access error > ------------------------------------------------------------------------------------------------------------------------------------------------ > > Key: HADOOP-7352 > URL: https://issues.apache.org/jira/browse/HADOOP-7352 > Project: Hadoop Common > Issue Type: Improvement > Components: fs, fs/s3 > Reporter: Matt Foley > Assignee: Matt Foley > > In HADOOP-6201 and HDFS-538 it was agreed that FileSystem::listStatus should throw FileNotFoundException instead of returning null, when the target directory did not exist. > However, in LocalFileSystem implementation today, FileSystem::listStatus still may return null, when the target directory exists but does not grant read permission. This causes NPE in many callers, for all the reasons cited in HADOOP-6201 and HDFS-538. See HADOOP-7327 and its linked issues for examples. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira