hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Collins (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6796) FileStatus allows null srcPath but crashes if that's done
Date Wed, 02 Jun 2010 16:56:40 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-6796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874658#action_12874658
] 

Eli Collins commented on HADOOP-6796:
-------------------------------------

Sounds like the simple thing to do is have your test:
{code}
s = new FileStatus();
s.setPath("/something");
s.setXXX(...);
{code}

Or use FileStatus#read like the only other user of the default constructor (ThriftHadoopFileSystem).
For the writable use case the reason the default values are null is that you know you're going
to immediately overwrite them via read() and this way you don't pay the cost of instantiating
an object you're just going to overwrite.

> FileStatus allows null srcPath but crashes if that's done
> ---------------------------------------------------------
>
>                 Key: HADOOP-6796
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6796
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.22.0
>            Reporter: Rodrigo Schmidt
>            Assignee: Rodrigo Schmidt
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6796.patch
>
>
> FileStatus allows constructor invocation with a null srcPath but many methods like write,
readFields, compareTo, equals, and hashCode depend on this property.

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


Mime
View raw message