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_r321203027
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java
##########
@@ -151,7 +152,9 @@ private void unregisterMXBean() {
*/
@Override
public List<DatanodeDetails> getNodes(NodeState nodestate) {
- return nodeStateManager.getNodes(nodestate).stream()
+ return nodeStateManager.getNodes(
+ new NodeStatus(HddsProtos.NodeOperationalState.IN_SERVICE, nodestate))
+ .stream()
.map(node -> (DatanodeDetails)node).collect(Collectors.toList());
}
Review comment:
Yea I need to fix the query function. I can imagine we will need things like
all IN_MAINT nodes (ignoring healthy, dead etc) or all dead (ignore op state).
Right now that is not possible to query until I figure out how to enhance the
interface.
----------------------------------------------------------------
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]