[
https://issues.apache.org/jira/browse/HDFS-9371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15034935#comment-15034935
]
Haohui Mai commented on HDFS-9371:
----------------------------------
Looks good to me overall.
>From BlockManager's prospective the semantic of DN map might be slightly
>different as it is possible that the DN map got changed during the point look
>up. Iterating of the DN map is still properly synchronized so I think the
>synchronization is correct.
One nit:
{code}
blockManager.removeFromInvalidates(new DatanodeInfo(node));
{code}
The function {{removeFromInvalidates}} can be removed.
+1 once addressed.
> Code cleanup for DatanodeManager
> --------------------------------
>
> Key: HDFS-9371
> URL: https://issues.apache.org/jira/browse/HDFS-9371
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Jing Zhao
> Assignee: Jing Zhao
> Attachments: HDFS-9371.000.patch, HDFS-9371.001.patch,
> HDFS-9371.002.patch
>
>
> Some code cleanup for DatanodeManager. The main changes include:
> # make the synchronization of {{datanodeMap}} and
> {{datanodesSoftwareVersions}} consistent
> # remove unnecessary lock in {{handleHeartbeat}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)