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

John Zhuge edited comment on HADOOP-7352 at 9/9/16 2:32 PM:
------------------------------------------------------------

You are right.

Patch 003 ensures {{listStatus}}, {{globStatus}}, and {{expandAsGlob}} to throw 
IOE upon access error. However, it is just 1 of the 3 possible choices:
* All throw IOE
* {{listStatus}} throws IOE, {{globStatus}}, and {{expandAsGlob}} return empty 
array
* All 3 return empty array


was (Author: jzhuge):
Yes.

Patch 003 ensures {{listStatus}}, {{globStatus}}, and {{expandAsGlob}} to throw 
IOE upon access error. However, it is just 1 of the 3 possible choices:
* All throw IOE
* {{listStatus}} throws IOE, {{globStatus}}, and {{expandAsGlob}} return empty 
array
* All 3 return empty array

> FileSystem#listStatus should throw IOE upon access error
> --------------------------------------------------------
>
>                 Key: HADOOP-7352
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7352
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 2.6.0
>            Reporter: Matt Foley
>            Assignee: John Zhuge
>         Attachments: HADOOP-7352.001.patch, HADOOP-7352.002.patch, 
> HADOOP-7352.003.patch
>
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to