[
https://issues.apache.org/jira/browse/HDFS-7433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14226882#comment-14226882
]
Colin Patrick McCabe commented on HDFS-7433:
--------------------------------------------
Can we separate out the {{DatanodeId#hashCode}} caching part of this into
another change? Although it's not a lot of lines of code, it feels kind of
tricky. And as I mentioned, it doesn't really relate to this, since we're
keying on Java's good old immutable String class here, not {{DatanodeId}}.
Otherwise, I'm +1 on the TreeMap -> HashMap part.
> DatanodeMap lookups & DatanodeID hashCodes are inefficient
> ----------------------------------------------------------
>
> 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
>
>
> 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)