hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [hbase] branch branch-1 updated: HBASE-23038 Provide consistent and clear logging about disabling chores
Date Sat, 28 Sep 2019 01:37:35 GMT
This is an automated email from the ASF dual-hosted git repository.

busbey pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
     new b96aefd  HBASE-23038 Provide consistent and clear logging about disabling chores
b96aefd is described below

commit b96aefd07f6e9a3e31d1bf99bcf84560545cf19a
Author: Sanjeet Nishad <sanjeetnishad95@gmail.com>
AuthorDate: Thu Sep 26 09:38:37 2019 +0530

    HBASE-23038 Provide consistent and clear logging about disabling chores
    
    Differs from master/branch-2 version due to commons-logging
    
    Co-authored-by: Sean Busbey <busbey@apache.org>
    Signed-off-by: Viraj Jasani <virajjasani007@gmail.com>
    Signed-off-by: Sean Busbey <busbey@apache.org>
    (cherry picked from commit b45c0d0efa261509ac101748587051ba1c9184bb)
---
 hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java
index 1623c10..49ac907 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java
@@ -151,6 +151,10 @@ public class ChoreService implements ChoreServicer {
     }
 
     try {
+      if (chore.getPeriod() <= 0) {
+        LOG.info("The period is " + chore.getPeriod() + " seconds, " + chore.getName() +
" is disabled");
+        return false;
+      }
       chore.setChoreServicer(this);
       ScheduledFuture<?> future =
           scheduler.scheduleAtFixedRate(chore, chore.getInitialDelay(), chore.getPeriod(),


Mime
View raw message