ChenSammi commented on code in PR #9310:
URL: https://github.com/apache/ozone/pull/9310#discussion_r2554913102
##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/AbstractDiskBalancerSubCommand.java:
##########
@@ -77,17 +80,54 @@ public Void call() throws Exception {
// Execute on all target datanodes and collect results
List<String> successNodes = new ArrayList<>();
List<String> failedNodes = new ArrayList<>();
+ List<Object> jsonResults = new ArrayList<>();
+ // Execute commands and collect results
for (String dn : targetDatanodes) {
- if (executeCommand(dn)) {
- successNodes.add(dn);
- } else {
+ try {
+ Object result = executeCommand(dn);
+ if (result != null) {
Review Comment:
It looks like every executeCommand either return an object or throw
exception, so doesn't need to check result null if there is no exception.
--
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]