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

Ming Ma commented on HDFS-7433:
-------------------------------

Daryn, I just reread the patch. You are right, that is not an issue.

There is one minor case in which the call to check() could be wasted. Say 
"dfs.namenode.decommission.nodes.per.interval" is set to 1 and you decommission 
only one node. The first check() will call checkDecommissionState() and set the 
DN's scan number to the global scan number, then it exit. The second check() 
will skip checkDecommissionState() call given the DN's scan is the same as the 
global global scan number; The third check() will do the actual check again and 
so on.

> DatanodeManager#datanodeMap should be a HashMap, not a TreeMap, to optimize 
> lookup performance
> ----------------------------------------------------------------------------------------------
>
>                 Key: HDFS-7433
>                 URL: https://issues.apache.org/jira/browse/HDFS-7433
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>    Affects Versions: 2.0.0-alpha, 3.0.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>            Priority: Critical
>         Attachments: HDFS-7433.patch, HDFS-7433.patch
>
>
> The datanode map is currently a {{TreeMap}}.  For many thousands of 
> datanodes, tree lookups are ~10X more expensive than a {{HashMap}}.  
> Insertions and removals are up to 100X more expensive.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to