hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject hbase git commit: HBASE-14257 Periodic flusher only handles hbase:meta, not other system tables. (Abhishek)
Date Tue, 27 Oct 2015 06:22:21 GMT
Repository: hbase
Updated Branches:
  refs/heads/master ac746e090 -> 4269c7fe6


HBASE-14257 Periodic flusher only handles hbase:meta, not other system tables. (Abhishek)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4269c7fe
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4269c7fe
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4269c7fe

Branch: refs/heads/master
Commit: 4269c7fe69baabbd813dcdf6ed0b3a57ea4b41de
Parents: ac746e0
Author: anoopsjohn <anoopsamjohn@gmail.com>
Authored: Tue Oct 27 11:52:03 2015 +0530
Committer: anoopsjohn <anoopsamjohn@gmail.com>
Committed: Tue Oct 27 11:52:03 2015 +0530

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/regionserver/HRegion.java    | 7 ++++---
 .../apache/hadoop/hbase/regionserver/TestDefaultMemStore.java | 6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/4269c7fe/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 07924e6..0fcdaab 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -1307,7 +1307,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
       "hbase.regionserver.optionalcacheflushinterval";
   /** Default interval for the memstore flush */
   public static final int DEFAULT_CACHE_FLUSH_INTERVAL = 3600000;
-  public static final int META_CACHE_FLUSH_INTERVAL = 300000; // 5 minutes
+  /** Default interval for System tables memstore flush */
+  public static final int SYSTEM_CACHE_FLUSH_INTERVAL = 300000; // 5 minutes
 
   /** Conf key to force a flush if there are already enough changes for one region in memstore
*/
   public static final String MEMSTORE_FLUSH_PER_CHANGES =
@@ -1995,9 +1996,9 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
       return true;
     }
     long modifiedFlushCheckInterval = flushCheckInterval;
-    if (getRegionInfo().isMetaRegion() &&
+    if (getRegionInfo().isSystemTable() &&
         getRegionInfo().getReplicaId() == HRegionInfo.DEFAULT_REPLICA_ID) {
-      modifiedFlushCheckInterval = META_CACHE_FLUSH_INTERVAL;
+      modifiedFlushCheckInterval = SYSTEM_CACHE_FLUSH_INTERVAL;
     }
     if (modifiedFlushCheckInterval <= 0) { //disabled
       return false;

http://git-wip-us.apache.org/repos/asf/hbase/blob/4269c7fe/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
index 882fd53..f1e20d1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
@@ -944,10 +944,10 @@ public class TestDefaultMemStore extends TestCase {
 
   public void testShouldFlushMeta() throws Exception {
     // write an edit in the META and ensure the shouldFlush (that the periodic memstore
-    // flusher invokes) returns true after META_CACHE_FLUSH_INTERVAL (even though
+    // flusher invokes) returns true after SYSTEM_CACHE_FLUSH_INTERVAL (even though
     // the MEMSTORE_PERIODIC_FLUSH_INTERVAL is set to a higher value)
     Configuration conf = new Configuration();
-    conf.setInt(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, HRegion.META_CACHE_FLUSH_INTERVAL
* 10);
+    conf.setInt(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, HRegion.SYSTEM_CACHE_FLUSH_INTERVAL
* 10);
     HBaseTestingUtility hbaseUtility = HBaseTestingUtility.createLocalHTU(conf);
     Path testDir = hbaseUtility.getDataTestDir();
     EnvironmentEdgeForMemstoreTest edge = new EnvironmentEdgeForMemstoreTest();
@@ -969,7 +969,7 @@ public class TestDefaultMemStore extends TestCase {
     edge.setCurrentTimeMillis(1234 + 100);
     StringBuffer sb = new StringBuffer();
     assertTrue(meta.shouldFlush(sb) == false);
-    edge.setCurrentTimeMillis(edge.currentTime() + HRegion.META_CACHE_FLUSH_INTERVAL + 1);
+    edge.setCurrentTimeMillis(edge.currentTime() + HRegion.SYSTEM_CACHE_FLUSH_INTERVAL +
1);
     assertTrue(meta.shouldFlush(sb) == true);
   }
 


Mime
View raw message