Yi Liu created HDFS-8988:
----------------------------

             Summary: Use LightWeightHashSet instead of LightWeightLinkedSet in 
BlockManager#excessReplicateMap
                 Key: HDFS-8988
                 URL: https://issues.apache.org/jira/browse/HDFS-8988
             Project: Hadoop HDFS
          Issue Type: Improvement
            Reporter: Yi Liu
            Assignee: Yi Liu
            Priority: Minor


{code}
public final Map<String, LightWeightLinkedSet<Block>> excessReplicateMap = new 
HashMap<>();
{code}
{{LightWeightLinkedSet}} extends {{LightWeightHashSet}} and keeps elements in 
order, but it requires more memory for each entry (2 references, totally 8 
bytes).  
We don't need to keep excess replicated blocks in order here, so should use  
{{LightWeightHashSet}}.



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

Reply via email to