[ 
https://issues.apache.org/jira/browse/HDFS-5228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz Wo (Nicholas), SZE updated HDFS-5228:
-----------------------------------------

    Attachment: h5228_20130919_test.patch

h5228_20130919_test.patch: a unit test for showing the bug.  It will result the 
following exception.
{noformat}
Running org.apache.hadoop.hdfs.TestDistributedFileSystem
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.991 sec <<< 
FAILURE! - in org.apache.hadoop.hdfs.TestDistributedFileSystem
testlistFiles(org.apache.hadoop.hdfs.TestDistributedFileSystem)  Time elapsed: 
2.839 sec  <<< ERROR!
java.lang.NullPointerException: null
        at org.apache.hadoop.fs.Path.<init>(Path.java:105)
        at org.apache.hadoop.fs.Path.makeQualified(Path.java:433)
        at 
org.apache.hadoop.hdfs.protocol.HdfsLocatedFileStatus.makeQualifiedLocated(HdfsLocatedFileStatus.java:77)
        at 
org.apache.hadoop.hdfs.DistributedFileSystem$15.hasNext(DistributedFileSystem.java:739)
        at org.apache.hadoop.fs.FileSystem$5.hasNext(FileSystem.java:1729)
        at 
org.apache.hadoop.hdfs.TestDistributedFileSystem.testlistFiles(TestDistributedFileSystem.java:855)
{noformat}

                
> The RemoteIterator returned by DistributedFileSystem.listFiles(..) may throw 
> NPE
> --------------------------------------------------------------------------------
>
>                 Key: HDFS-5228
>                 URL: https://issues.apache.org/jira/browse/HDFS-5228
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: h5228_20130919_test.patch
>
>
> Get a RemoteIterator from DistributedFileSystem.listFiles(..) with a relative 
> path.  Then, it will result a NullPointerException when calling hasNext() 
> from the RemoteIterator.
> This bug was discovered by Arnaud:
> http://hortonworks.com/community/forums/topic/new-bug-in-hdfs-listfiles-method/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to