hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msi...@apache.org
Subject hadoop git commit: HDFS-12415. Ozone: TestXceiverClientManager and TestAllocateContainer occasionally fails. Contributed by Mukul Kumar Singh.
Date Fri, 13 Oct 2017 06:42:08 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-7240 311fd321c -> 196833348


HDFS-12415. Ozone: TestXceiverClientManager and TestAllocateContainer occasionally fails.
Contributed by Mukul Kumar Singh.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/19683334
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/19683334
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/19683334

Branch: refs/heads/HDFS-7240
Commit: 19683334847b35a8c1e570b3710c1c8af50105cc
Parents: 311fd32
Author: Mukul Kumar Singh <msingh@apache.org>
Authored: Fri Oct 13 12:10:33 2017 +0530
Committer: Mukul Kumar Singh <msingh@apache.org>
Committed: Fri Oct 13 12:10:33 2017 +0530

----------------------------------------------------------------------
 .../apache/hadoop/ozone/scm/node/SCMNodeManager.java | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/19683334/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodeManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodeManager.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodeManager.java
index f818e75..ebe67c1 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodeManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodeManager.java
@@ -20,7 +20,6 @@ package org.apache.hadoop.ozone.scm.node;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
-import org.apache.commons.collections.map.HashedMap;
 import org.apache.hadoop.hdfs.protocol.DatanodeID;
 import org.apache.hadoop.hdfs.protocol.UnregisteredNodeException;
 import org.apache.hadoop.metrics2.util.MBeans;
@@ -105,13 +104,13 @@ public class SCMNodeManager
   /**
    * Key = NodeID, value = timestamp.
    */
-  private final Map<String, Long> healthyNodes;
-  private final Map<String, Long> staleNodes;
-  private final Map<String, Long> deadNodes;
+  private final ConcurrentHashMap<String, Long> healthyNodes;
+  private final ConcurrentHashMap<String, Long> staleNodes;
+  private final ConcurrentHashMap<String, Long> deadNodes;
   private final Queue<HeartbeatQueueItem> heartbeatQueue;
-  private final Map<String, DatanodeID> nodes;
+  private final ConcurrentHashMap<String, DatanodeID> nodes;
   // Individual live node stats
-  private final Map<String, SCMNodeStat> nodeStats;
+  private final ConcurrentHashMap<String, SCMNodeStat> nodeStats;
   // Aggregated node stats
   private SCMNodeStat scmStat;
   // TODO: expose nodeStats and scmStat as metrics
@@ -158,8 +157,8 @@ public class SCMNodeManager
     healthyNodes = new ConcurrentHashMap<>();
     deadNodes = new ConcurrentHashMap<>();
     staleNodes = new ConcurrentHashMap<>();
-    nodes = new HashMap<>();
-    nodeStats = new HashedMap();
+    nodes = new ConcurrentHashMap<>();
+    nodeStats = new ConcurrentHashMap();
     scmStat = new SCMNodeStat();
 
     healthyNodeCount = new AtomicInteger(0);


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


Mime
View raw message