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 "Todd Lipcon (JIRA)" <ji...@apache.org> on 2009/11/17 00:07:39 UTC

[jira] Created: (HADOOP-6377) ChecksumFileSystem.getContentSummary throws NPE on /foo

ChecksumFileSystem.getContentSummary throws NPE on /foo
-------------------------------------------------------

                 Key: HADOOP-6377
                 URL: https://issues.apache.org/jira/browse/HADOOP-6377
             Project: Hadoop Common
          Issue Type: Bug
            Reporter: Todd Lipcon


There seems to be some inconsistent usage of "null" vs empty arrays in FileSystem that causes NPEs trying to getContentSummary of a path directly within the root.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6377) ChecksumFileSystem.getContentSummary throws NPE when directory contains inaccessible directories

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HADOOP-6377:
--------------------------------

    Description: When getContentSummary is called on a path that contains an unreadable directory, it throws NPE, since RawLocalFileSystem.listStatus(Path) returns null when File.list() returns null.  (was: There seems to be some inconsistent usage of "null" vs empty arrays in FileSystem that causes NPEs trying to getContentSummary of a path directly within the root.)
        Summary: ChecksumFileSystem.getContentSummary throws NPE when directory contains inaccessible directories  (was: ChecksumFileSystem.getContentSummary throws NPE on /foo)

> ChecksumFileSystem.getContentSummary throws NPE when directory contains inaccessible directories
> ------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6377
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6377
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.21.0, 0.22.0
>            Reporter: Todd Lipcon
>
> When getContentSummary is called on a path that contains an unreadable directory, it throws NPE, since RawLocalFileSystem.listStatus(Path) returns null when File.list() returns null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6377) ChecksumFileSystem.getContentSummary throws NPE on /foo

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HADOOP-6377:
--------------------------------

          Component/s: fs
    Affects Version/s: 0.22.0
                       0.21.0

> ChecksumFileSystem.getContentSummary throws NPE on /foo
> -------------------------------------------------------
>
>                 Key: HADOOP-6377
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6377
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.21.0, 0.22.0
>            Reporter: Todd Lipcon
>
> There seems to be some inconsistent usage of "null" vs empty arrays in FileSystem that causes NPEs trying to getContentSummary of a path directly within the root.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6377) ChecksumFileSystem.getContentSummary throws NPE on /foo

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778632#action_12778632 ] 

Todd Lipcon commented on HADOOP-6377:
-------------------------------------

With FsShell modified to print stack traces:

{noformat}
todd@todd-laptop:~/git/hadoop-common$ ./bin/hadoop fs -du /tmp/
Found 29 items
java.lang.NullPointerException
        at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1060)
        at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1083)
        at org.apache.hadoop.fs.ChecksumFileSystem.listStatus(ChecksumFileSystem.java:473)
        at org.apache.hadoop.fs.FileSystem.getContentSummary(FileSystem.java:1024)
        at org.apache.hadoop.fs.FsShell.du(FsShell.java:731)
        at org.apache.hadoop.fs.FsShell.run(FsShell.java:1894)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.fs.FsShell.main(FsShell.java:1973)
{noformat}

This occurs on trunk and branch-0.21, but not branch-0.20

> ChecksumFileSystem.getContentSummary throws NPE on /foo
> -------------------------------------------------------
>
>                 Key: HADOOP-6377
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6377
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.21.0, 0.22.0
>            Reporter: Todd Lipcon
>
> There seems to be some inconsistent usage of "null" vs empty arrays in FileSystem that causes NPEs trying to getContentSummary of a path directly within the root.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6377) ChecksumFileSystem.getContentSummary throws NPE when directory contains inaccessible directories

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794733#action_12794733 ] 

Todd Lipcon commented on HADOOP-6377:
-------------------------------------

Not sure what the correct recourse is here. Hadoop 0.20 reports the unreadable directories as 0 bytes with no warnings. Linux du prints a warning for each and does not include them in the stdout output.

> ChecksumFileSystem.getContentSummary throws NPE when directory contains inaccessible directories
> ------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6377
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6377
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.21.0, 0.22.0
>            Reporter: Todd Lipcon
>
> When getContentSummary is called on a path that contains an unreadable directory, it throws NPE, since RawLocalFileSystem.listStatus(Path) returns null when File.list() returns null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.