errose28 commented on code in PR #6241:
URL: https://github.com/apache/ozone/pull/6241#discussion_r1506734784
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java:
##########
@@ -1105,6 +1111,54 @@ public StartContainerBalancerResponseProto
startContainerBalancer(
cbc.setMaxSizeLeavingSource(msls * OzoneConsts.GB);
}
+ if (balancingInterval.isPresent()) {
+ long bi = balancingInterval.get();
+ auditMap.put("balancingInterval", String.valueOf(bi));
+ Preconditions.checkState(bi > 0,
+ "balancingInterval must be greater than zero.");
+ cbc.setBalancingInterval(bi);
+ }
+
+ if (moveTimeout.isPresent()) {
+ long mt = moveTimeout.get();
+ auditMap.put("moveTimeout", String.valueOf(mt));
+ Preconditions.checkState(mt > 0,
+ "moveTimeout must be greater than zero.");
+ cbc.setMoveTimeout(mt);
+ }
+
+ if (moveReplicationTimeout.isPresent()) {
+ long mrt = moveReplicationTimeout.get();
+ auditMap.put("moveReplicationTimeout", String.valueOf(mrt));
+ Preconditions.checkState(mrt > 0,
+ "moveTimeout must be greater than zero.");
Review Comment:
Hmm looks like Hadoop RPC is automatically doing some conversion to get the
Runtime exception message back to the client? I can't figure out if the handler
thread is crashing at the end of this or not, but it's probably a daemon so SCM
keeps running. Better to explicitly throw a checked exception and make sure the
response proto is updated so [this code
runs](https://github.com/apache/ozone/blob/886fc3d419e07a5736a2112fd748c3b212c2f11f/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerBalancerStartSubcommand.java#L86-L90).
--
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]