[
https://issues.apache.org/jira/browse/HDFS-8792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14658477#comment-14658477
]
Colin Patrick McCabe commented on HDFS-8792:
--------------------------------------------
{code}
530 /** The starting modification for fail-fast. */
{code}
This JavaDoc comment is stale. It seems like it should be "the current
modification epoch" or similar.
{code}
public final Map<String, LightWeightLinkedSet<BlockInfo>> excessReplicateMap
=
- new TreeMap<>();
+ new HashMap<>();
{code}
Can you put this in a separate JIRA? It's less obvious to me that this is a
win. Java {{HashMaps}} don't ever shrink, whereas {{TreeMap}} uses less memory
when elements are removed.
> Improve BlockManager#postponedMisreplicatedBlocks and
> BlockManager#excessReplicateMap
> -------------------------------------------------------------------------------------
>
> Key: HDFS-8792
> URL: https://issues.apache.org/jira/browse/HDFS-8792
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Yi Liu
> Assignee: Yi Liu
> Attachments: HDFS-8792.001.patch, HDFS-8792.002.patch
>
>
> {{LightWeightHashSet}} requires fewer memory than java hashset.
> Furthermore, for {{excessReplicateMap}}, we can use {{HashMap}} instead of
> {{TreeMap}} instead, since no need to sort.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)