ramkrish86 commented on a change in pull request #757: HBASE-23196 The
IndexChunkPool’s percentage is hard code to 0.1
URL: https://github.com/apache/hbase/pull/757#discussion_r338918229
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ChunkCreator.java
##########
@@ -79,35 +81,33 @@
static ChunkCreator instance;
@VisibleForTesting
static boolean chunkPoolDisabled = false;
- private MemStoreChunkPool dataChunksPool;
- private int chunkSize;
- private MemStoreChunkPool indexChunksPool;
+ private Optional<MemStoreChunkPool> indexChunksPool;
+ private Optional<MemStoreChunkPool> dataChunksPool;
+ private final int chunkSize;
+ private final int indexChunkSize;
@VisibleForTesting
ChunkCreator(int chunkSize, boolean offheap, long globalMemStoreSize, float
poolSizePercentage,
- float initialCountPercentage, HeapMemoryManager
heapMemoryManager,
- float indexChunkSizePercentage) {
+ float initialCountPercentage, float indexChunkPercentage, int
indexChunkSize,
+ HeapMemoryManager heapMemoryManager) {
this.offheap = offheap;
- this.chunkSize = chunkSize; // in case pools are not allocated
- initializePools(chunkSize, globalMemStoreSize, poolSizePercentage,
indexChunkSizePercentage,
- initialCountPercentage, heapMemoryManager);
+ this.chunkSize = chunkSize;
+ this.indexChunkSize = indexChunkSize;
+ initializePools(globalMemStoreSize, poolSizePercentage,
indexChunkPercentage,
+ initialCountPercentage, heapMemoryManager);
}
@VisibleForTesting
- private void initializePools(int chunkSize, long globalMemStoreSize,
- float poolSizePercentage, float
indexChunkSizePercentage,
- float initialCountPercentage,
- HeapMemoryManager heapMemoryManager) {
+ private void initializePools(long globalMemStoreSize, float
poolSizePercentage,
+ float indexChunkPercentage, float initialCountPercentage,
+ HeapMemoryManager heapMemoryManager) {
this.dataChunksPool = initializePool("data", globalMemStoreSize,
- (1 - indexChunkSizePercentage) * poolSizePercentage,
- initialCountPercentage, chunkSize, heapMemoryManager);
+ (1 - indexChunkPercentage) * poolSizePercentage,
+ initialCountPercentage, chunkSize, heapMemoryManager);
// The index chunks pool is needed only when the index type is CCM.
Review comment:
If MSLAB is enabled and if we use CompactingMemstore I think for now the
code always creates CCM type. Do we have a way to enable ARRAy_TYPE when CMS is
enabled? For the default memstore yes - we should make it 0 for index chunk
pool (if it is still getting initialized).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services