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 01:31:40 GMT

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

Eli Collins commented on HADOOP-6796:

If you can get rid of the FileStatus() constructor that's preferable since it's a useful invariant
that objects are fully initialized after their constructors are called (users and methods
don't need to worry about partially constructed objects) but that might not be possible or
worth the trouble with FileStatus. I think it basically comes down to whether there is a good
default value for a FileStatus path.  Getting an NPE or hitting an assert when you try to
use a partially constructed object seems preferable to accidentally using a value that wasn't
intended (ie make users specify the path for a file status). My 2c. 

> 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.

View raw message