wchevreuil commented on code in PR #5528:
URL: https://github.com/apache/hbase/pull/5528#discussion_r1398975901


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java:
##########
@@ -398,4 +414,33 @@ public void archiveMetaLog(final ServerName serverName) {
       LOG.warn("Failed archiving meta log for server " + serverName, ie);
     }
   }
+
+  private static Stoppable createDummyStoppable() {
+    return new Stoppable() {
+      private volatile boolean isStopped = false;
+
+      @Override
+      public void stop(String why) {
+        isStopped = true;
+      }
+
+      @Override
+      public boolean isStopped() {
+        return isStopped;
+      }
+    };
+  }
+
+  public ScheduledChore getOldWALsDirSizeUpdaterChore() {
+    return new ScheduledChore("UpdateOldWALsDirSize", createDummyStoppable(), 
OLD_WAL_DIR_UPDATE_INTERVAL) {

Review Comment:
   We could return 0 or a negative value in the metric, and document that such 
values mean the metric calculation is disabled. I think it's worth to make it 
possible for operators to disable it because this would consume a spot in the 
ChoreExecutor pool, which could impact execution of other important background 
work, such as the file cleaners. 



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

Reply via email to