You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "siddhantsangwan (via GitHub)" <gi...@apache.org> on 2023/12/01 11:12:20 UTC
Re: [PR] HDDS-9554. Introduce a CLI command to show the datanodes under decommissioning [ozone]
siddhantsangwan commented on code in PR #5488:
URL: https://github.com/apache/ozone/pull/5488#discussion_r1411950646
##########
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DecommissionStatusSubCommand.java:
##########
@@ -59,6 +64,15 @@ public void execute(ScmClient scmClient) throws IOException {
System.err.println("Datanode: " + uuid + " is not in DECOMMISSIONING");
return;
}
+ } else if (!Strings.isNullOrEmpty(ipAddress)) {
+ decommissioningNodes = scmClient.queryNode(DECOMMISSIONING, null,
+ HddsProtos.QueryScope.CLUSTER, "").stream().filter(p ->
+ p.getNodeID().getIpAddress().compareToIgnoreCase(ipAddress) == 0)
+ .collect(Collectors.toList());
+ if (decommissioningNodes.isEmpty()) {
+ System.err.println("Datanode: " + uuid + " is not in DECOMMISSIONING");
Review Comment:
`uuid` should be `ipAddress`.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org