hadoop-hdfs-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] (HDFS-4036) FSDirectory.unprotectedAddFile(..) should not throw UnresolvedLinkException
Date Thu, 11 Oct 2012 06:41:03 GMT

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

Eli Collins commented on HDFS-4036:

unprotectedAddFile does not throw UnresolvedLinkException because addNode unconditionally
swallows the IOE (and ULE is a subclass of IOE) and returns null... 

try {
  newNode = addNode(path, newNode, UNKNOWN_DISK_SPACE);
} catch (IOException e) {
  return null;

This doesn't break symlinks because by the time we happen to have gotten to this point all
the symlinks in path have already been fully resolved (otherwise symlinks would be broken
because we hide the ULE that the client needs to get to resolve the link). But the issue here
doesn't seem to be that we're claiming to throw a ULE when we don't, it's why are we unconditionally
swallowing IOEs here w/o so much as a warning? That doesn't seem right.
> FSDirectory.unprotectedAddFile(..) should not throw UnresolvedLinkException
> ---------------------------------------------------------------------------
>                 Key: HDFS-4036
>                 URL: https://issues.apache.org/jira/browse/HDFS-4036
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 3.0.0
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Jing Zhao
>         Attachments: HDFS-4036-trunk.001.patch
> The code in FSDirectory.unprotectedAddFile(..) does not throw UnresolvedLinkException,
we should remove "throws UnresolvedLinkException" from the declaration.

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