siddhantsangwan commented on code in PR #8910:
URL: https://github.com/apache/ozone/pull/8910#discussion_r2306203472
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java:
##########
@@ -1298,6 +1298,7 @@ public void stopContainerBalancer() throws IOException {
} catch (IllegalContainerBalancerStateException e) {
AUDIT.logWriteFailure(buildAuditMessageForFailure(
SCMAction.STOP_CONTAINER_BALANCER, null, e));
+ throw new IOException(e.getMessage());
Review Comment:
```suggestion
throw new IOException(e.getMessage(), e);
```
##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerBalancerStopSubcommand.java:
##########
@@ -34,7 +34,13 @@ public class ContainerBalancerStopSubcommand extends
ScmSubcommand {
@Override
public void execute(ScmClient scmClient) throws IOException {
System.out.println("Sending stop command. Waiting for Container Balancer
to stop...");
- scmClient.stopContainerBalancer();
- System.out.println("Container Balancer stopped.");
+ try {
+ scmClient.stopContainerBalancer();
+ System.out.println("Container Balancer stopped.");
+ } catch (IOException e) {
+ String msg = "Failed to stop Container Balancer";
+ System.err.println(msg);
+ throw new IOException(msg, e);
Review Comment:
```suggestion
throw e;
```
--
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]