hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5228) The RemoteIterator returned by DistributedFileSystem.listFiles(..) may throw NPE
Date Thu, 19 Sep 2013 18:49:53 GMT

    [ https://issues.apache.org/jira/browse/HDFS-5228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13772160#comment-13772160

Andrew Wang commented on HDFS-5228:

Hey guys, thanks for finding this and posting a patch. I agree it's very important to fix
for 2.1.1, and almost certainly present in 2.1.0.

Couple patch notes:

* please remove the white-space only change in HdfsLocatedFileStatus
* please remove new {{@Deprecated}} annotations in DistributedFileSystem, let's keep this
fix small
* test name should be camel-cased as {{testListFiles}}
* should use {{#fixRelativePart()}} rather than in-lining the qualification.

Basically, besides the new test, I think all we need is (matching the style of the rest of

Path absF = fixRelativePart(p);

and then renaming {{p}} to {{absF}} below.

I don't think this by itself is cause to revert HADOOP-9418. Basically all DFS methods are
supposed to pass Paths through {{fixRelativePart}} and then {{getPathName}}, it just looks
like we missed this one. It might be worth auditing DFS to make sure we didn't miss anything
> 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.patch, 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

View raw message