You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by sa...@apache.org on 2020/07/10 12:48:33 UTC
[hadoop-ozone] 08/08: HDDS-3918. ConcurrentModificationException in ContainerReportHandler.… (#1174)
This is an automated email from the ASF dual-hosted git repository.
sammichen pushed a commit to branch ozone-0.6.0
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
commit a15c68cf1178673997434e290c90f52000dd20f4
Author: Xiaoyu Yao <xy...@apache.org>
AuthorDate: Thu Jul 9 20:42:58 2020 -0700
HDDS-3918. ConcurrentModificationException in ContainerReportHandler.… (#1174)
(cherry picked from commit d6693a91926cc3a5d3fd6681e3b26880f93a2de2)
---
.../java/org/apache/hadoop/hdds/scm/node/states/NodeStateMap.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/NodeStateMap.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/NodeStateMap.java
index b770dd8..baebef5 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/NodeStateMap.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/NodeStateMap.java
@@ -67,7 +67,7 @@ public class NodeStateMap {
*/
private void initStateMap() {
for (NodeState state : NodeState.values()) {
- stateMap.put(state, new HashSet<>());
+ stateMap.put(state, ConcurrentHashMap.newKeySet());
}
}
@@ -88,7 +88,7 @@ public class NodeStateMap {
throw new NodeAlreadyExistsException("Node UUID: " + id);
}
nodeMap.put(id, new DatanodeInfo(datanodeDetails));
- nodeToContainer.put(id, new HashSet<>());
+ nodeToContainer.put(id, ConcurrentHashMap.newKeySet());
stateMap.get(nodeState).add(id);
} finally {
lock.writeLock().unlock();
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-commits-help@hadoop.apache.org