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

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

     [ https://issues.apache.org/jira/browse/HDFS-15783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Akira Ajisaka resolved HDFS-15783.
----------------------------------
    Fix Version/s: 3.2.3
                   3.1.5
                   3.4.0
                   3.3.1
       Resolution: Fixed

Committed to trunk, branch-3.3, branch-3.2, and branch-3.1.

> 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
>            Assignee: Akira Ajisaka
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.3.1, 3.4.0, 3.1.5, 3.2.3
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> {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-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org