hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9415) Fix NullPointerException in getLinkTarget
Date Thu, 21 Mar 2013 18:51:15 GMT

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

Konstantin Shvachko commented on HADOOP-9415:

I think it is the right thing to throw FileNotFoundException if the link path does not exist.
You are changing the semantics of {{nn.getLinkTarget()}} to never return null, but nobody
seems relied on it.
A small thing. The preferred format for {{FileNotFoundException}} is
new FileNotFoundException("File does not exist: " + f)
With the path in the end rather than in the middle. People didn't follow this convention lately,
let's keep it with your change.
> Fix NullPointerException in getLinkTarget
> -----------------------------------------
>                 Key: HADOOP-9415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9415
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs
>    Affects Versions: 3.0.0
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>            Priority: Minor
>         Attachments: hadoop-9415-1.patch, hadoop-9415-2.patch
> {{HdfsFileStatus#getLinkTarget}} can throw a NPE in {{DFSUtil#bytes2String}} if {{symlink}}
is null. Better to instead return null and propagate this to the client.

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