[
https://issues.apache.org/jira/browse/HDFS-4209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501215#comment-13501215
]
Suresh Srinivas commented on HDFS-4209:
---------------------------------------
Comments:
# FSDirectory.java - Reading the namenode cache threshold is moved? There is
also call to reset(). The need for this is not obvious to me.
# addToParentForImageLoading - I would use the same convention as currently
exists unprotectedAddToParent(). While this may not be a great method name, at
least it does not make the method name relevant only for image loading. In the
future the method may be used for something other than image loading. Please
update the javadoc to say, one example where this method is called is during
image loading...
# addToParentForImageLoading silently ignores failure to addChild to the
parent. This is not a code introduced by this patch. We should address this in
a separate jira.
# FSDirectory.java changes could have been divided into smaller jiras.
#* New methods for processing the last inode of inodesInPath could have been
seaprate from this jira. But given I have gone through the review you could
leave it in this jira. Up to you.
#* If possible move the fixes where settimg parent's mtime correctly etc. into
another jira.
# Instead of throwing generic IOException, we should throw specific exception
in Inode*.valueOf() methods. This could be done in another jira.
> Clean up FSDirectory and INode
> ------------------------------
>
> Key: HDFS-4209
> URL: https://issues.apache.org/jira/browse/HDFS-4209
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Tsz Wo (Nicholas), SZE
> Priority: Minor
> Attachments: h4209_20121118b.patch, h4209_20121118.patch,
> h4209_20121119.patch
>
>
> - FSDirectory.addToParent(..) is only used by image loading so that
> synchronization, modification time update and space count update are not
> needed.
> - There are multiple places checking whether an inode is file by checking
> !isDirectory() && !isSymlink(). Let's add isFile() to INode.
> - In the addNode/addChild/addChildNoQuotaCheck methods, returning the same
> INode back is not useful. It is better to simply return a boolean to
> indicate whether the inode is added. Also, the value of childDiskspace
> parameter is always UNKNOWN_DISK_SPACE.
--
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