From 2997b6d0714d5542784baf830e7c16a9ef6b62d6 Mon Sep 17 00:00:00 2001 From: tedyu Date: Fri, 13 Jul 2018 11:19:45 -0700 Subject: [PATCH] HBASE-20879 Compacting memstore config should handle lower case --- .../main/java/org/apache/hadoop/hbase/regionserver/HStore.java | 2 +- .../apache/hadoop/hbase/regionserver/TestRecoveredEdits.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 c1e6788ac89..db868fdeba5 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 @@ -346,7 +346,7 @@ public class HStore implements Store, HeapSize, StoreConfigInformation, Propagat if (inMemoryCompaction == null) { inMemoryCompaction = MemoryCompactionPolicy.valueOf(conf.get(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_KEY, - CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT)); + CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT).toUpperCase()); } switch (inMemoryCompaction) { case NONE: diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRecoveredEdits.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRecoveredEdits.java index cdf48017e19..34f6ca1ad7f 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRecoveredEdits.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRecoveredEdits.java @@ -90,7 +90,7 @@ public class TestRecoveredEdits { Configuration conf = new Configuration(TEST_UTIL.getConfiguration()); // Set it so we flush every 1M or so. Thats a lot. conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024*1024); - conf.set(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_KEY, String.valueOf(policy)); + conf.set(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_KEY, String.valueOf(policy).toLowerCase()); // The file of recovered edits has a column family of 'meta'. Also has an encoded regionname // of 4823016d8fca70b25503ee07f4c6d79f which needs to match on replay. final String encodedRegionName = "4823016d8fca70b25503ee07f4c6d79f";