HBASE-13865 Increase the default value for hbase.hregion.memstore.block.multipler from 2 to 4 (part 2)

This commit is contained in:
Gábor Lipták 2015-06-08 19:53:44 -04:00 committed by Nick Dimiduk
parent 7a9e10dc11
commit 7417835853
6 changed files with 18 additions and 5 deletions

View File

@ -355,6 +355,18 @@ public final class HConstants {
*/
public static final int DEFAULT_HSTORE_OPEN_AND_CLOSE_THREADS_MAX = 1;
/**
* Block updates if memstore has hbase.hregion.memstore.block.multiplier
* times hbase.hregion.memstore.flush.size bytes. Useful preventing
* runaway memstore during spikes in update traffic.
*/
public static final String HREGION_MEMSTORE_BLOCK_MULTIPLIER =
"hbase.hregion.memstore.block.multiplier";
/**
* Default value for hbase.hregion.memstore.block.multiplier
*/
public static final int DEFAULT_HREGION_MEMSTORE_BLOCK_MULTIPLIER = 4;
/** Conf key for the memstore size at which we flush the memstore */
public static final String HREGION_MEMSTORE_FLUSH_SIZE =

View File

@ -758,7 +758,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
}
this.memstoreFlushSize = flushSize;
this.blockingMemStoreSize = this.memstoreFlushSize *
conf.getLong("hbase.hregion.memstore.block.multiplier", 2);
conf.getLong(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER,
HConstants.DEFAULT_HREGION_MEMSTORE_BLOCK_MULTIPLIER);
}
/**

View File

@ -73,7 +73,7 @@ public class TestClientPushback {
// load
conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, flushSizeBytes);
// ensure we block the flushes when we are double that flushsize
conf.setLong("hbase.hregion.memstore.block.multiplier", 2);
conf.setLong(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER, HConstants.DEFAULT_HREGION_MEMSTORE_BLOCK_MULTIPLIER);
UTIL.startMiniCluster(1);
UTIL.createTable(tableName, family);

View File

@ -104,7 +104,7 @@ public class TestCompaction {
// Set cache flush size to 1MB
conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024 * 1024);
conf.setInt("hbase.hregion.memstore.block.multiplier", 100);
conf.setInt(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER, 100);
conf.set(CompactionThroughputControllerFactory.HBASE_THROUGHPUT_CONTROLLER_KEY,
NoLimitCompactionThroughputController.class.getName());
compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);

View File

@ -92,7 +92,7 @@ public class TestMajorCompaction {
// Set cache flush size to 1MB
conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024*1024);
conf.setInt("hbase.hregion.memstore.block.multiplier", 100);
conf.setInt(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER, 100);
compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);
secondRowBytes = START_KEY_BYTES.clone();

View File

@ -69,7 +69,7 @@ public class TestMinorCompaction {
// Set cache flush size to 1MB
conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024*1024);
conf.setInt("hbase.hregion.memstore.block.multiplier", 100);
conf.setInt(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER, 100);
compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);
firstRowBytes = START_KEY_BYTES;