You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by re...@apache.org on 2019/06/20 02:57:34 UTC
[hbase] branch master updated: HBASE-22596 [Chore] Separate the
execution period between CompactionChecker and PeriodicMemStoreFlusher
This is an automated email from the ASF dual-hosted git repository.
reidchan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new c7c6140 HBASE-22596 [Chore] Separate the execution period between CompactionChecker and PeriodicMemStoreFlusher
c7c6140 is described below
commit c7c6140396528f8f9d4dff43035a516e7ba2f22a
Author: Reid Chan <re...@apache.org>
AuthorDate: Tue Jun 18 11:09:34 2019 +0800
HBASE-22596 [Chore] Separate the execution period between CompactionChecker and PeriodicMemStoreFlusher
Signed-off-by: Zach York <zy...@apache.org>
Signed-off-by: Xu Cang <xu...@apache.org>
---
.../org/apache/hadoop/hbase/regionserver/HRegionServer.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index 401c1b2..157f186 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -357,6 +357,11 @@ public class HRegionServer extends HasThread implements
protected final int threadWakeFrequency;
protected final int msgInterval;
+ private static final String PERIOD_COMPACTION = "hbase.regionserver.compaction.check.period";
+ private final int compactionCheckFrequency;
+ private static final String PERIOD_FLUSH = "hbase.regionserver.flush.check.period";
+ private final int flushCheckFrequency;
+
protected final int numRegionsToReport;
// Stub to do region server status calls against the master.
@@ -576,6 +581,8 @@ public class HRegionServer extends HasThread implements
this.numRetries = this.conf.getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER,
HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER);
this.threadWakeFrequency = conf.getInt(HConstants.THREAD_WAKE_FREQUENCY, 10 * 1000);
+ this.compactionCheckFrequency = conf.getInt(PERIOD_COMPACTION, this.threadWakeFrequency);
+ this.flushCheckFrequency = conf.getInt(PERIOD_FLUSH, this.threadWakeFrequency);
this.msgInterval = conf.getInt("hbase.regionserver.msginterval", 3 * 1000);
this.sleeper = new Sleeper(this.msgInterval, this);
@@ -2018,8 +2025,8 @@ public class HRegionServer extends HasThread implements
// Background thread to check for compactions; needed if region has not gotten updates
// in a while. It will take care of not checking too frequently on store-by-store basis.
- this.compactionChecker = new CompactionChecker(this, this.threadWakeFrequency, this);
- this.periodicFlusher = new PeriodicMemStoreFlusher(this.threadWakeFrequency, this);
+ this.compactionChecker = new CompactionChecker(this, this.compactionCheckFrequency, this);
+ this.periodicFlusher = new PeriodicMemStoreFlusher(this.flushCheckFrequency, this);
this.leases = new Leases(this.threadWakeFrequency);
// Create the thread to clean the moved regions list