You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Daryn Sharp (JIRA)" <ji...@apache.org> on 2011/06/02 00:54:47 UTC
[jira] [Commented] (HADOOP-7327) FileSystem.listStatus() throws
NullPointerException instead of IOException upon access permission failure
[ https://issues.apache.org/jira/browse/HADOOP-7327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042494#comment-13042494 ]
Daryn Sharp commented on HADOOP-7327:
-------------------------------------
A generic IOE with a message of "Error accessing", while definitively preferable to a NPE that tears down FsShell, affords the user no idea of the underlying error. At a minimum, it would be nice to distinguish a permission denied from a "something went wrong". I think that would still conform to NIO behavior since the security manager will throw an exception.
> FileSystem.listStatus() throws NullPointerException instead of IOException upon access permission failure
> ---------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-7327
> URL: https://issues.apache.org/jira/browse/HADOOP-7327
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.22.0, 0.23.0
> Reporter: Matt Foley
> Assignee: Matt Foley
> Attachments: hadoop-7327-1.patch
>
>
> Many processes that call listStatus() expect to handle IOException, but instead are getting runtime error NullPointerException, if the directory being scanned is visible but no-access to the running user id. For example, if directory foo is drwxr-xr-x, and subdirectory foo/bar is drwx------, then trying to do listStatus(Path(foo/bar)) will cause a NullPointerException.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira