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

Tsz Wo (Nicholas), SZE commented on HDFS-4036:
----------------------------------------------

> Nicholas, but why is it unprotected? In What cases should we unconditionally 
> swallow an IOE? Shouldn't we at least log a debug?

The method was there for a long time.  By "unprotected", I think it means that 
error checking must be done before calling the method.  That's why it swallow 
exceptions.  It is a bad coding style.
                
> 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
>             Fix For: 2.0.3-alpha
>
>         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

Reply via email to