siddhantsangwan commented on a change in pull request #2786:
URL: https://github.com/apache/ozone/pull/2786#discussion_r749187234
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerConfiguration.java
##########
@@ -332,6 +337,22 @@ public void setIncludeNodes(String includeNodes) {
this.includeNodes = includeNodes;
}
+ /**
+ * Sets the datanodes that will be the exclusive participants in balancing.
+ * Applicable only if the specified file is non-empty.
+ * @param includeNodes a File of datanode hostnames or ip addresses
+ * @throws IOException if an I/O error occurs when opening the file
+ */
+ public void setIncludeNodes(File includeNodes) throws IOException {
+ try (Stream<String> strings = Files.lines(includeNodes.toPath(),
+ StandardCharsets.UTF_8)) {
+ this.includeNodes = strings.collect(Collectors.joining(","));
+ } catch (IOException e) {
+ LOG.debug("Could not read the specified includeNodes file.");
Review comment:
My bad. Improving this.
--
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]