hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkris...@apache.org
Subject hbase git commit: HBASE-18994 Decide if META/System tables should use Compacting Memstore or Default Memstore (Ram)
Date Thu, 26 Oct 2017 05:15:37 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 28d81295f -> 0acfba0e3


HBASE-18994 Decide if META/System tables should use Compacting Memstore or
Default Memstore (Ram)


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

Branch: refs/heads/master
Commit: 0acfba0e35933d1008c9ade721055dafc137b50f
Parents: 28d8129
Author: Ramkrishna <ramkrishna.s.vasudevan@intel.com>
Authored: Thu Oct 26 10:44:59 2017 +0530
Committer: Ramkrishna <ramkrishna.s.vasudevan@intel.com>
Committed: Thu Oct 26 10:44:59 2017 +0530

----------------------------------------------------------------------
 .../hadoop/hbase/regionserver/HStore.java       | 36 ++++++++++++--------
 1 file changed, 21 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/0acfba0e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index 52db699..c0cea4e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -264,24 +264,30 @@ public class HStore implements Store, HeapSize, StoreConfigInformation,
Propagat
     // Why not just pass a HColumnDescriptor in here altogether?  Even if have
     // to clone it?
     scanInfo = new ScanInfo(conf, family, ttl, timeToPurgeDeletes, this.comparator);
-    MemoryCompactionPolicy inMemoryCompaction = family.getInMemoryCompaction();
-    if(inMemoryCompaction == null) {
-      inMemoryCompaction = MemoryCompactionPolicy.valueOf(
-          conf.get(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_KEY,
-              CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT));
+    MemoryCompactionPolicy inMemoryCompaction = null;
+    if (this.getTableName().isSystemTable()) {
+      inMemoryCompaction = MemoryCompactionPolicy
+          .valueOf(conf.get("hbase.systemtables.compacting.memstore.type", "NONE"));
+    } else {
+      inMemoryCompaction = family.getInMemoryCompaction();
+    }
+    if (inMemoryCompaction == null) {
+      inMemoryCompaction =
+          MemoryCompactionPolicy.valueOf(conf.get(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_KEY,
+            CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT));
     }
     String className;
     switch (inMemoryCompaction) {
-      case BASIC :
-      case EAGER :
-        Class<? extends CompactingMemStore> clz = conf.getClass(MEMSTORE_CLASS_NAME,
-          CompactingMemStore.class, CompactingMemStore.class);
-        className = clz.getName();
-        this.memstore = ReflectionUtils.newInstance(clz, new Object[] { conf, this.comparator,
this,
-            this.getHRegion().getRegionServicesForStores(), inMemoryCompaction});
-        break;
-      case NONE :
-      default:
+    case BASIC:
+    case EAGER:
+      Class<? extends CompactingMemStore> clz =
+          conf.getClass(MEMSTORE_CLASS_NAME, CompactingMemStore.class, CompactingMemStore.class);
+      className = clz.getName();
+      this.memstore = ReflectionUtils.newInstance(clz, new Object[] { conf, this.comparator,
this,
+          this.getHRegion().getRegionServicesForStores(), inMemoryCompaction });
+      break;
+    case NONE:
+    default:
       className = DefaultMemStore.class.getName();
       this.memstore = ReflectionUtils.newInstance(DefaultMemStore.class,
         new Object[] { conf, this.comparator });


Mime
View raw message