diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java index ab938577f1d..b2a89c87eb0 100644 --- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java +++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java @@ -40,6 +40,7 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.PerformanceEvaluation.RandomReadTest; import org.apache.hadoop.hbase.PerformanceEvaluation.TestOptions; +import org.apache.hadoop.hbase.regionserver.CompactingMemStore; import org.apache.hadoop.hbase.testclassification.MiscTests; import org.apache.hadoop.hbase.testclassification.SmallTests; import org.junit.ClassRule; @@ -56,6 +57,19 @@ public class TestPerformanceEvaluation { private static final HBaseTestingUtility HTU = new HBaseTestingUtility(); + @Test + public void testDefaultInMemoryCompaction() { + PerformanceEvaluation.TestOptions defaultOpts = + new PerformanceEvaluation.TestOptions(); + assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT.toString(), + defaultOpts.getInMemoryCompaction().toString()); + HTableDescriptor htd = PerformanceEvaluation.getTableDescriptor(defaultOpts); + for (HColumnDescriptor hcd: htd.getFamilies()) { + assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT.toString(), + hcd.getInMemoryCompaction().toString()); + } + } + @Test public void testSerialization() throws JsonGenerationException, JsonMappingException, IOException { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java index 68d7d7ec2bc..c1b061a01c0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java @@ -58,7 +58,7 @@ public class CompactingMemStore extends AbstractMemStore { public static final String COMPACTING_MEMSTORE_TYPE_KEY = "hbase.hregion.compacting.memstore.type"; public static final String COMPACTING_MEMSTORE_TYPE_DEFAULT = - String.valueOf(MemoryCompactionPolicy.BASIC); + String.valueOf(MemoryCompactionPolicy.NONE); // Default fraction of in-memory-flush size w.r.t. flush-to-disk size public static final String IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY = "hbase.memstore.inmemoryflush.threshold.factor";