chihsuan commented on code in PR #11487:
URL: https://github.com/apache/ozone/pull/11487#discussion_r4248148379
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/NodeStateMap.java:
##########
@@ -322,13 +322,11 @@ public void removeContainer(DatanodeID datanodeID,
ContainerID containerID) thro
*/
@Override
public String toString() {
- // TODO - fix this method to include the commented out values
StringBuilder builder = new StringBuilder();
builder.append("Total number of nodes: ").append(getTotalNodeCount());
- // for (NodeState state : NodeState.values()) {
- // builder.append("Number of nodes in ").append(state).append(" state: ")
- // .append(getNodeCount(state));
- // }
+ for (NodeState state : NodeState.values()) {
+ builder.append(", ").append(state).append(":
").append(getNodeCount(null, state));
Review Comment:
nit: Would it be clearer to call `countNodes(matching(state))` directly?
That makes the health-state filter explicit without needing to interpret the
`null` wildcard.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]