You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ChenSammi (via GitHub)" <gi...@apache.org> on 2023/02/07 09:06:33 UTC

[GitHub] [ozone] ChenSammi commented on a diff in pull request #3874: HDDS-7383. Basic framework of DiskBalancerService

ChenSammi commented on code in PR #3874:
URL: https://github.com/apache/ozone/pull/3874#discussion_r1098373220


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -297,6 +297,61 @@ public void setWaitOnAllFollowers(boolean val) {
   )
   private String containerSchemaV3KeySeparator = "|";
 
+  @Config(key = "disk.balancer.should.run.default",
+      defaultValue = "false",
+      type = ConfigType.BOOLEAN,
+      tags = { DATANODE, ConfigTag.DISKBALANCER},
+      description =
+          "If DiskBalancer fails to get information from diskbalancer.info, " +
+              "it will choose this value to decide if this service should be " +
+              "running."
+  )
+  private boolean diskBalancerShouldRun = false;
+
+  public boolean getDiskBalancerShouldRun() {
+    return diskBalancerShouldRun;
+  }
+
+  public void setDiskBalancerShouldRun(boolean shouldRun) {
+    this.diskBalancerShouldRun = shouldRun;
+  }
+
+  @Config(key = "disk.balancer.service.interval",
+      defaultValue = "60s",
+      type = ConfigType.TIME,
+      tags = { DATANODE, ConfigTag.DISKBALANCER},
+      description = "Time interval of the Datanode DiskBalancer service. " +
+          "The Datanode will check the service periodically and update " +
+          "the config and running status for DiskBalancer service. " +
+          "Unit could be defined with postfix (ns,ms,s,m,h,d). "
+  )
+  private long diskBalancerInterval = Duration.ofSeconds(60).toMillis();
+
+  public Duration getDiskBalancerInterval() {
+    return Duration.ofMillis(diskBalancerInterval);
+  }
+
+  public void setDiskBalancerInterval(Duration duration) {
+    this.diskBalancerInterval = duration.toMillis();
+  }
+
+  @Config(key = "disk.balancer.service.timeout",
+      defaultValue = "300s",
+      type = ConfigType.TIME,
+      tags = { DATANODE, ConfigTag.DISKBALANCER},
+      description = "Timeout for the Datanode DiskBalancer service. "
+          + "Unit could be defined with postfix (ns,ms,s,m,h,d). "
+  )
+  private long diskBalancerTimeout = Duration.ofSeconds(300).toMillis();
+
+  public Duration getDiskBalancerTimeout() {
+    return Duration.ofMillis(diskBalancerTimeout);
+  }
+
+  public void setDiskBalancerTimeout(Duration duration) {
+    this.diskBalancerTimeout = duration.toMillis();
+  }
+

Review Comment:
   Can we move all disk balancer related configuration to DiskBalancerConfiguration? 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org