You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Akira Ajisaka (Jira)" <ji...@apache.org> on 2021/01/19 08:34:00 UTC

[jira] [Created] (HDFS-15783) Speed up BlockPlacementPolicyRackFaultTolerant#verifyBlockPlacement

Akira Ajisaka created HDFS-15783:
------------------------------------

             Summary: Speed up BlockPlacementPolicyRackFaultTolerant#verifyBlockPlacement
                 Key: HDFS-15783
                 URL: https://issues.apache.org/jira/browse/HDFS-15783
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: block placement
            Reporter: Akira Ajisaka


{code:java}
Set<String> racks = new TreeSet<>();
for (DatanodeInfo dn : locs) {
  racks.add(dn.getNetworkLocation());
}
return new BlockPlacementStatusDefault(racks.size(), numberOfReplicas,
    clusterMap.getNumOfRacks());{code}
Here, HashMap should be used instead of TreeSet.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org