You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/04/29 23:05:58 UTC

[GitHub] [ozone] avijayanhwx commented on a change in pull request #2193: HDDS-5159. Make periodic disk check interval configurable.

avijayanhwx commented on a change in pull request #2193:
URL: https://github.com/apache/ozone/pull/2193#discussion_r623458007



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java
##########
@@ -110,6 +114,15 @@ public void setBlockDeletionLimit(int limit) {
     this.blockLimitPerInterval = limit;
   }
 
+  @Config(key = "periodic.disk.check.interval.minutes",
+      defaultValue = "15",
+      type = ConfigType.LONG,

Review comment:
       Do we need a LONG? Can we just use an INT or TIME instead?

##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/MutableVolumeSet.java
##########
@@ -123,14 +124,19 @@ public MutableVolumeSet(String dnUuid, String clusterID,
             t.setDaemon(true);
             return t;
         });
+
+    DatanodeConfiguration dnConf =
+        conf.getObject(DatanodeConfiguration.class);
+    long periodicDiskCheckIntervalMinutes =
+        dnConf.getPeriodicDiskCheckIntervalMinutes();
     this.periodicDiskChecker =
       diskCheckerservice.scheduleWithFixedDelay(() -> {
         try {
           checkAllVolumes();
         } catch (IOException e) {
           LOG.warn("Exception while checking disks", e);
         }
-      }, DISK_CHECK_INTERVAL_MINUTES, DISK_CHECK_INTERVAL_MINUTES,

Review comment:
       @guihecheng Are there other usages of DISK_CHECK_INTERVAL_MINUTES? If not, can that constant be removed as well?




-- 
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.

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