[
https://issues.apache.org/jira/browse/HDFS-8792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14631255#comment-14631255
]
Yi Liu commented on HDFS-8792:
------------------------------
test failures of {{testNNClearsCommandsOnFailover*}} are related.
{code}
java.lang.UnsupportedOperationException: Remove is not supported.
at
org.apache.hadoop.hdfs.util.LightWeightHashSet$LinkedSetIterator.remove(LightWeightHashSet.java:565)
{code}
The remove of {{LightWeightHashSet$LinkedSetIterator}} is not implemented,
actually it's easy to implement and will add it later.
Furthermore
{code}
public final Map<String, LightWeightLinkedSet<BlockInfo>> excessReplicateMap =
new TreeMap<>();
{code}
we can use {{HashMap}} instead of {{TreeMap}} instead, since we don't need to
sort. Will update the patch later.
> Use LightWeightHashSet for BlockManager#postponedMisreplicatedBlocks
> --------------------------------------------------------------------
>
> 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
>
>
> {{LightWeightHashSet}} requires fewer memory than java hashset.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)