[
https://issues.apache.org/jira/browse/HDFS-9223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14952361#comment-14952361
]
Tsz Wo Nicholas Sze commented on HDFS-9223:
-------------------------------------------
> ... do you think this change is OK?
Yes, the change looks good.
Some minor comments:
- Please as well fix the "atleast" typo in the javadoc of
DatanodeDescriptor.checkBlockReportReceived().
- It looks like the following format change was done by accident.
{code}
- BlockManager.LOG.debug("Adding block recovery task " + task + "to "
- + getName() + ", current queue size is " + erasurecodeBlocks.size());
+ BlockManager.LOG.debug("Adding block recovery task " + task + "to " +
getName() + ", current queue size is " + erasurecodeBlocks.size());
{code}
Other suggestions:
- The stats related calls should synchronize on HeartbeatManager.stats but not
the HeartbeatManager object.
- In heartbeatCheck(), the local variable dead can be changed from DatanodeID
to DatanodeDescriptor. Then, could we as well change
DatanodeManager.removeDeadDatanode(DatanodeID) to
DatanodeManager.removeDeadDatanode(DatanodeDescriptor) so that it does not need
to lookup the DatanodeDescriptor?
> Code cleanup for DatanodeDescriptor and HeartbeatManager
> --------------------------------------------------------
>
> Key: HDFS-9223
> URL: https://issues.apache.org/jira/browse/HDFS-9223
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Reporter: Jing Zhao
> Assignee: Jing Zhao
> Priority: Minor
> Attachments: HDFS-9223.000.patch
>
>
> Some code cleanup for {{DatanodeDescriptor}} and {{HeartbeatManager}}. The
> changes include:
> # Change {{DataDescriptor#isAlive}} and {{DatanodeDescriptor#needKeyUpdate}}
> from public to private
> # Use EnumMap for {{HeartbeatManager#storageTypeStatesMap}}
> # Move the {{isInStartupSafeMode}} out of the namesystem lock in
> {{heartbeatCheck}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)