nandakumar131 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_r321626983
########## 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: It is better to have `NodeStatus` inside `DatanodeInfo` rather than having two separate fields. Yes, `stateMap` helped us to easily get the list/count of nodes in a specific state, but with the current changes it is not straight forward to maintain `state -> list of nodes`. In any case we will be iteration over all the available nodes to get list of nodes in a given state. The number of nodes in a cluster should not go beyond 3-4 order of magnitude. We can re-visit and optimize this, if we run into any performance issue. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org