From 73028d5bd9f85655b284654579ddcbbca31e41e8 Mon Sep 17 00:00:00 2001 From: gsheffi Date: Mon, 26 Feb 2018 11:18:38 +0200 Subject: [PATCH] for creating patch HBASE-20074-V01.patch Signed-off-by: Michael Stack --- .../hadoop/hbase/regionserver/CompactingMemStore.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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 44b40ebf36a..d60b04924c9 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 @@ -136,14 +136,10 @@ public class CompactingMemStore extends AbstractMemStore { numStores = 1; } inmemoryFlushSize = memstoreFlushSize / numStores; - // multiply by a factor (different factors for different index types) - if (indexType == IndexType.ARRAY_MAP) { - factor = conf.getDouble(IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY, + // multiply by a factor (the same factor for all index types) + factor = conf.getDouble(IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY, IN_MEMORY_FLUSH_THRESHOLD_FACTOR_DEFAULT); - } else { - factor = conf.getDouble(IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY, - IN_MEMORY_FLUSH_THRESHOLD_FACTOR_DEFAULT); - } + inmemoryFlushSize = (long) (inmemoryFlushSize * factor); LOG.info("Setting in-memory flush size threshold to {} and immutable segments index to type={}", StringUtils.byteDesc(inmemoryFlushSize), indexType);