FAQ
listStatus for local files throws NPE instead of permission denied
------------------------------------------------------------------

Key: HADOOP-7345
URL: https://issues.apache.org/jira/browse/HADOOP-7345
Project: Hadoop Common
Issue Type: Bug
Components: fs
Affects Versions: 0.23.0
Reporter: Daryn Sharp


Calling {{fs.listStatus}} on a local directory where the user does not have permissions generates a {{NullPointerException}}:

{noformat}
Exception in thread "main" java.lang.NullPointerException
at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1115)
at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1150)
at org.apache.hadoop.fs.ChecksumFileSystem.listStatus(ChecksumFileSystem.java:494)
{noformat}

FileSystem.java:
{code}
1111: private void listStatus(ArrayList<FileStatus> results, Path f,
1112: PathFilter filter) throws FileNotFoundException, IOException {
1113: FileStatus listing[] = listStatus(f);
1114:
1115: for (int i = 0; i < listing.length; i++) {
{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Search Discussions

  • Bharath Mundlapudi (JIRA) at Jun 1, 2011 at 9:59 pm
    [ https://issues.apache.org/jira/browse/HADOOP-7345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Bharath Mundlapudi resolved HADOOP-7345.
    ----------------------------------------

    Resolution: Duplicate
    listStatus for local files throws NPE instead of permission denied
    ------------------------------------------------------------------

    Key: HADOOP-7345
    URL: https://issues.apache.org/jira/browse/HADOOP-7345
    Project: Hadoop Common
    Issue Type: Bug
    Components: fs
    Affects Versions: 0.23.0
    Reporter: Daryn Sharp

    Calling {{fs.listStatus}} on a local directory where the user does not have permissions generates a {{NullPointerException}}:
    {noformat}
    Exception in thread "main" java.lang.NullPointerException
    at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1115)
    at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1150)
    at org.apache.hadoop.fs.ChecksumFileSystem.listStatus(ChecksumFileSystem.java:494)
    {noformat}
    FileSystem.java:
    {code}
    1111: private void listStatus(ArrayList<FileStatus> results, Path f,
    1112: PathFilter filter) throws FileNotFoundException, IOException {
    1113: FileStatus listing[] = listStatus(f);
    1114:
    1115: for (int i = 0; i < listing.length; i++) {
    {code}
    --
    This message is automatically generated by JIRA.
    For more information on JIRA, see: http://www.atlassian.com/software/jira

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-dev @
categorieshadoop
postedJun 1, '11 at 12:25a
activeJun 1, '11 at 9:59p
posts2
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Bharath Mundlapudi (JIRA): 2 posts

People

Translate

site design / logo © 2022 Grokbase