ChenSammi commented on code in PR #9310:
URL: https://github.com/apache/ozone/pull/9310#discussion_r2540878412
##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerReportSubcommand.java:
##########
@@ -41,23 +42,28 @@ public class DiskBalancerReportSubcommand extends
AbstractDiskBalancerSubCommand
private final List<HddsProtos.DatanodeDiskBalancerInfoProto> reports = new
ArrayList<>();
@Override
- protected boolean executeCommand(String hostName) {
- try (DiskBalancerProtocol diskBalancerProxy = DiskBalancerSubCommandUtil
- .getSingleNodeDiskBalancerProxy(hostName)) {
+ protected Object executeCommand(String hostName) throws IOException {
Review Comment:
Can you refactor the executeCommand()? If json mode, there is no need to
return any object for current report handler, and displayResults(), the input
List<String> successNodes, List<String> failedNodes are not used in report and
status. So consider remove the reports and status field, and unify the
process.
--
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]