Tejaskriya commented on code in PR #6241:
URL: https://github.com/apache/ozone/pull/6241#discussion_r1514829047
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java:
##########
@@ -1100,11 +1107,53 @@ public StartContainerBalancerResponseProto
startContainerBalancer(
long msls = maxSizeLeavingSource.get();
auditMap.put("maxSizeLeavingSource", String.valueOf(msls));
Preconditions.checkState(msls > 0,
- "maxSizeLeavingSource must be " +
+ "Max Size Leaving Source must be " +
"greater than zero.");
cbc.setMaxSizeLeavingSource(msls * OzoneConsts.GB);
}
+ if (balancingInterval.isPresent()) {
+ long bi = balancingInterval.get();
+ auditMap.put("balancingInterval", String.valueOf(bi));
+ Preconditions.checkState(bi > 0,
Review Comment:
As we are performing Preconditions.checkState on the client side already in
StorageContainerLocationProtocolClientSideTranslatorPB.java, I don't think we
need these checks here. Currently the methods in this class are invoked via
this path `StorageContainerLocationProtocolClientSideTranslatorPB ->
StorageContainerLocationProtocolServerSideTranslatorPB ->
SCMClientProtocolServer`, so these checks would be redundant.
cc: @siddhantsangwan
##########
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerBalancerStartSubcommand.java:
##########
@@ -74,13 +74,56 @@ public class ContainerBalancerStartSubcommand extends
ScmSubcommand {
"(for example, '26' for 26GB).")
private Optional<Long> maxSizeLeavingSourceInGB;
+ @Option(names = {"--balancing-iteration-interval-minutes"},
+ description = "The interval period in minutes between each iteration of
Container Balancer. " +
+ "Value should be greater than '0' and default value is 70 (for
example, '70' for 70 minutes).")
Review Comment:
We could mention the defaults for the options present above already too (not
added in this current PR, like threshold, iterations,
max-size-leaving-source-in-gb) wherever applicable.
--
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]