symious commented on code in PR #3874:
URL: https://github.com/apache/ozone/pull/3874#discussion_r1103825888
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DiskBalancerManager.java:
##########
@@ -126,6 +131,113 @@ public List<HddsProtos.DatanodeDiskBalancerInfoProto>
getDiskBalancerStatus(
}
}
+ /**
+ * Send startDiskBalancer command to datanodes.
+ * If hosts is not specified, send commands to all healthy datanodes.
+ * @param threshold new configuration of threshold
+ * @param bandwidthInMB new configuration of bandwidthInMB
+ * @param parallelThread new configuration of parallelThread
+ * @param hosts Datanodes that command will apply on
+ * @return Possible errors
+ * @throws IOException
+ */
+ public List<DatanodeAdminError> startDiskBalancer(
+ Optional<Double> threshold, Optional<Long> bandwidthInMB,
+ Optional<Integer> parallelThread, Optional<List<String>> hosts)
+ throws IOException {
+ List<DatanodeDetails> dns;
+ if (hosts.isPresent()) {
+ dns = NodeUtils.mapHostnamesToDatanodes(nodeManager, hosts.get(),
+ useHostnames);
Review Comment:
Updated, please have a check.
--
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]