sodonnel commented on a change in pull request #1344: HDDS-1982 Extend
SCMNodeManager to support decommission and maintenance states
URL: https://github.com/apache/hadoop/pull/1344#discussion_r321616777
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/NodeStateMap.java
##########
@@ -43,7 +45,7 @@
/**
* Represents the current state of node.
*/
- private final ConcurrentHashMap<NodeState, Set<UUID>> stateMap;
+ private final ConcurrentHashMap<UUID, NodeStatus> stateMap;
Review comment:
Do you think it makes sense to have a field inside DatanodeInfo of type
NodeStatus, so we can always pass the states around as a pair, or should we add
two individual fields to DatanodeInfo - nodeHealth and nodeOperationalState?
Also, one other thing to consider, is nodeStateMap originally kept a list of
healthy, stale and dead, so it was possible to quickly return all nodes in that
state. However now, we need to iterate over the whole list to find those nodes.
One reason for this, is that we have 15 different states now instead of 3. If
we move nodeStatus into datanodeInfo, it would be more difficult to optimise
this later if needed. However it would simplify things if we simply remove this
stateMap.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]