You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2021/01/21 01:12:00 UTC
[hadoop] branch branch-3.2 updated: HDFS-15783. Speed up
BlockPlacementPolicyRackFaultTolerant#verifyBlockPlacement (#2626)
This is an automated email from the ASF dual-hosted git repository.
aajisaka pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new f1dff46 HDFS-15783. Speed up BlockPlacementPolicyRackFaultTolerant#verifyBlockPlacement (#2626)
f1dff46 is described below
commit f1dff467e1878650f0814bcd3ab7fb84e0428e34
Author: Akira Ajisaka <aa...@apache.org>
AuthorDate: Thu Jan 21 10:07:46 2021 +0900
HDFS-15783. Speed up BlockPlacementPolicyRackFaultTolerant#verifyBlockPlacement (#2626)
(cherry picked from commit 45b3a8470975e67cce0e3e4d8eb8c7b6e7b6992f)
---
.../blockmanagement/BlockPlacementPolicyRackFaultTolerant.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyRackFaultTolerant.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyRackFaultTolerant.java
index b204450..dad877f 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyRackFaultTolerant.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyRackFaultTolerant.java
@@ -237,9 +237,8 @@ public class BlockPlacementPolicyRackFaultTolerant extends BlockPlacementPolicyD
// only one rack
return new BlockPlacementStatusDefault(1, 1, 1);
}
- // 1. Check that all locations are different.
- // 2. Count locations on different racks.
- Set<String> racks = new TreeSet<>();
+ // Count locations on different racks.
+ Set<String> racks = new HashSet<>();
for (DatanodeInfo dn : locs) {
racks.add(dn.getNetworkLocation());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org