Andrei Mikhalev created HDDS-10830:
--------------------------------------
Summary: Replace ConcurrentHashMap with HashMap protected by
ReadWriteLock
Key: HDDS-10830
URL: https://issues.apache.org/jira/browse/HDDS-10830
Project: Apache Ozone
Issue Type: Improvement
Components: SCM
Reporter: Andrei Mikhalev
There is a class
[NodeStateMap|https://github.com/apache/ozone/blob/master/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/NodeStateMap.java#L47]
with 3 fields:
# {{ConcurrentHashMap<UUID, DatanodeInfo> nodeMap}}
# {{ConcurrentHashMap<UUID, Set<ContainerID>> nodeToContainer}}
# {{rivate final ReadWriteLock lock}}
Both *read* and *write* in _NodeStateMap_ are protected by *lock*.
We can safely replace _ConcurrentHashMap_ with pure _HashMap_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]