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 na...@apache.org on 2019/07/12 08:59:55 UTC
[hadoop] branch ozone-0.4.1 updated: HDDS-1752.
ConcurrentModificationException while handling DeadNodeHandler event.
(#1080)
This is an automated email from the ASF dual-hosted git repository.
nanda pushed a commit to branch ozone-0.4.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/ozone-0.4.1 by this push:
new 24ed608 HDDS-1752. ConcurrentModificationException while handling DeadNodeHandler event. (#1080)
24ed608 is described below
commit 24ed608afc79591888d2218e44e2e6b5c7770361
Author: Hrishikesh Gadre <hg...@gmail.com>
AuthorDate: Fri Jul 12 01:45:48 2019 -0700
HDDS-1752. ConcurrentModificationException while handling DeadNodeHandler event. (#1080)
(cherry picked from commit 14c43f85de86c8547dd23e228584cc5e83449870)
---
.../java/org/apache/hadoop/hdds/scm/node/states/Node2PipelineMap.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/Node2PipelineMap.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/Node2PipelineMap.java
index 20fe797..f8633f9 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/Node2PipelineMap.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/Node2PipelineMap.java
@@ -22,9 +22,9 @@ import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import org.apache.hadoop.hdds.scm.pipeline.Pipeline;
import org.apache.hadoop.hdds.scm.pipeline.PipelineID;
-import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
/**
* This data structure maintains the list of pipelines which the given
@@ -59,7 +59,7 @@ public class Node2PipelineMap extends Node2ObjectsMap<PipelineID> {
public synchronized void addPipeline(Pipeline pipeline) {
for (DatanodeDetails details : pipeline.getNodes()) {
UUID dnId = details.getUuid();
- dn2ObjectMap.computeIfAbsent(dnId, k -> new HashSet<>())
+ dn2ObjectMap.computeIfAbsent(dnId, k -> ConcurrentHashMap.newKeySet())
.add(pipeline.getId());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org