Replies: 1 comment
-
Ref: #6303 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a base class
org.apache.hadoop.hdds.scm.node.states.Node2ObjectsMap
forNode2PipelineMap
andNode2ContainerMap
.It is redundant because of:
Node2ContainerMap
is used only in testsNode2PipelineMap
doesn't need inheritance at allMoreover
Node2PipelineMap
containsConcurrentHashMap<UUID, Set<PipelineID>>
and 2synchronized
methods:void addPipeline(Pipeline pipeline)
-> compute if absent for concurrent hash mapvoid removePipeline(Pipeline pipeline)
-> compute if present for concurrent hash mapI suppose
synchronized
is redundant here for these two methods.There is a proposed change:
org.apache.hadoop.hdds.scm.node.states.Node2ObjectsMap
classNode2ContainerMap
to testssynchronized
forNode2PipelineMap::addPipeline
andNode2PipelineMap::removePipeline
Beta Was this translation helpful? Give feedback.
All reactions