From 076c688780ecf66b0f593d7c19ce8944dc4451d4 Mon Sep 17 00:00:00 2001 From: yliu Date: Tue, 18 Aug 2015 09:25:03 +0800 Subject: [PATCH] HDFS-8862. BlockManager#excessReplicateMap should use a HashMap. (yliu) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../hadoop/hdfs/server/blockmanagement/BlockManager.java | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 7ab41e894e2..31b197a9187 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -472,6 +472,8 @@ Release 2.8.0 - UNRELEASED HDFS-8845. DiskChecker should not traverse the entire tree (Chang Li via Colin P. McCabe) + HDFS-8862. BlockManager#excessReplicateMap should use a HashMap. (yliu) + BUG FIXES HDFS-8091: ACLStatus and XAttributes should be presented to diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java index 254a628ceb6..abcb2ad51a8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java @@ -33,7 +33,6 @@ import java.util.List; import java.util.Map; import java.util.Queue; import java.util.Set; -import java.util.TreeMap; import java.util.TreeSet; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicLong; @@ -203,7 +202,7 @@ public class BlockManager implements BlockStatsMXBean { * DataNode. We'll eventually remove these extras. */ public final Map> excessReplicateMap = - new TreeMap>(); + new HashMap<>(); /** * Store set of Blocks that need to be replicated 1 or more times.