HBASE-13865 Increase the default value for hbase.hregion.memstore.block.multipler from 2 to 4 (part 2)
This commit is contained in:
parent
7a9e10dc11
commit
7417835853
|
@ -355,6 +355,18 @@ public final class HConstants {
|
||||||
*/
|
*/
|
||||||
public static final int DEFAULT_HSTORE_OPEN_AND_CLOSE_THREADS_MAX = 1;
|
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 */
|
/** Conf key for the memstore size at which we flush the memstore */
|
||||||
public static final String HREGION_MEMSTORE_FLUSH_SIZE =
|
public static final String HREGION_MEMSTORE_FLUSH_SIZE =
|
||||||
|
|
|
@ -758,7 +758,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
|
||||||
}
|
}
|
||||||
this.memstoreFlushSize = flushSize;
|
this.memstoreFlushSize = flushSize;
|
||||||
this.blockingMemStoreSize = this.memstoreFlushSize *
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class TestClientPushback {
|
||||||
// load
|
// load
|
||||||
conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, flushSizeBytes);
|
conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, flushSizeBytes);
|
||||||
// ensure we block the flushes when we are double that flushsize
|
// 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.startMiniCluster(1);
|
||||||
UTIL.createTable(tableName, family);
|
UTIL.createTable(tableName, family);
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class TestCompaction {
|
||||||
|
|
||||||
// Set cache flush size to 1MB
|
// Set cache flush size to 1MB
|
||||||
conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024 * 1024);
|
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,
|
conf.set(CompactionThroughputControllerFactory.HBASE_THROUGHPUT_CONTROLLER_KEY,
|
||||||
NoLimitCompactionThroughputController.class.getName());
|
NoLimitCompactionThroughputController.class.getName());
|
||||||
compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);
|
compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class TestMajorCompaction {
|
||||||
|
|
||||||
// Set cache flush size to 1MB
|
// Set cache flush size to 1MB
|
||||||
conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024*1024);
|
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);
|
compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);
|
||||||
|
|
||||||
secondRowBytes = START_KEY_BYTES.clone();
|
secondRowBytes = START_KEY_BYTES.clone();
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class TestMinorCompaction {
|
||||||
|
|
||||||
// Set cache flush size to 1MB
|
// Set cache flush size to 1MB
|
||||||
conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024*1024);
|
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);
|
compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);
|
||||||
|
|
||||||
firstRowBytes = START_KEY_BYTES;
|
firstRowBytes = START_KEY_BYTES;
|
||||||
|
|
Loading…
Reference in New Issue