You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2019/11/15 03:16:53 UTC

[hbase] branch branch-2.1 updated (99510dc -> bcae8c3)

This is an automated email from the ASF dual-hosted git repository.

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


    from 99510dc  HBASE-23290 shell processlist command is broken
     new 6fda7af  HBASE-23038 Provide consistent and clear logging about disabling chores
     new bcae8c3  HBASE-23283 Provide clear and consistent logging about the period of enabled chores

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/hadoop/hbase/ChoreService.java      | 5 +++++
 .../src/main/java/org/apache/hadoop/hbase/master/HMaster.java    | 9 ++-------
 2 files changed, 7 insertions(+), 7 deletions(-)


[hbase] 01/02: HBASE-23038 Provide consistent and clear logging about disabling chores

Posted by bu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

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

    HBASE-23038 Provide consistent and clear logging about disabling chores
    
    Signed-off-by: Viraj Jasani <vi...@gmail.com>
    Signed-off-by: Sean Busbey <bu...@apache.org>
    (cherry picked from commit b45c0d0efa261509ac101748587051ba1c9184bb)
---
 .../src/main/java/org/apache/hadoop/hbase/ChoreService.java      | 4 ++++
 .../src/main/java/org/apache/hadoop/hbase/master/HMaster.java    | 9 ++-------
 2 files changed, 6 insertions(+), 7 deletions(-)

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 85d6131..5e83ef3 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
@@ -150,6 +150,10 @@ public class ChoreService implements ChoreServicer {
     }
 
     try {
+      if (chore.getPeriod() <= 0) {
+        LOG.info("The period is {} seconds, {} is disabled", chore.getPeriod(), chore.getName());
+        return false;
+      }
       chore.setChoreServicer(this);
       ScheduledFuture<?> future =
           scheduler.scheduleAtFixedRate(chore, chore.getInitialDelay(), chore.getPeriod(),
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index df74d97..1e4028c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -1215,13 +1215,8 @@ public class HMaster extends HRegionServer implements MasterServices {
 
     int mobCompactionPeriod = conf.getInt(MobConstants.MOB_COMPACTION_CHORE_PERIOD,
         MobConstants.DEFAULT_MOB_COMPACTION_CHORE_PERIOD);
-    if (mobCompactionPeriod > 0) {
-      this.mobCompactChore = new MobCompactionChore(this, mobCompactionPeriod);
-      getChoreService().scheduleChore(mobCompactChore);
-    } else {
-      LOG
-        .info("The period is " + mobCompactionPeriod + " seconds, MobCompactionChore is disabled");
-    }
+    this.mobCompactChore = new MobCompactionChore(this, mobCompactionPeriod);
+    getChoreService().scheduleChore(mobCompactChore);
     this.mobCompactThread = new MasterMobCompactionThread(this);
   }
 


[hbase] 02/02: HBASE-23283 Provide clear and consistent logging about the period of enabled chores

Posted by bu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bcae8c3b73d5ac1b22f8eadf6dfdc350e9dab09b
Author: Mingliang Liu <li...@apache.org>
AuthorDate: Tue Nov 12 23:59:08 2019 -0800

    HBASE-23283 Provide clear and consistent logging about the period of enabled chores
    
    Signed-off-by: Sean Busbey <bu...@apache.org>
---
 hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 5e83ef3..0ad52b2 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,9 +151,10 @@ public class ChoreService implements ChoreServicer {
 
     try {
       if (chore.getPeriod() <= 0) {
-        LOG.info("The period is {} seconds, {} is disabled", chore.getPeriod(), chore.getName());
+        LOG.info("Chore {} is disabled because its period is not positive.", chore);
         return false;
       }
+      LOG.info("Chore {} is enabled.", chore);
       chore.setChoreServicer(this);
       ScheduledFuture<?> future =
           scheduler.scheduleAtFixedRate(chore, chore.getInitialDelay(), chore.getPeriod(),