Skip to content

Commit

Permalink
HBASE-23196 The IndexChunkPool’s percentage is hard code to 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxu14 committed Oct 25, 2019
1 parent da9a53e commit fda55d0
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ private int calculateNumberOfChunks(int numOfCells, int chunkSize) {
// If the percentage of its remaining free space is above the INDEX_CHUNK_UNUSED_SPACE
// threshold, then we will use index chunks (which are smaller) instead.
private ChunkCreator.ChunkType useIndexChunks(int numOfCells) {
if (!ChunkCreator.getInstance().hasIndexChunkPool()) {
return ChunkCreator.ChunkType.DATA_CHUNK;
}
int dataChunkSize = ChunkCreator.getInstance().getChunkSize();
int numOfCellsInChunk = calcNumOfCellsInChunk(dataChunkSize);
int cellsInLastChunk = numOfCells % numOfCellsInChunk;
Expand Down
Loading

0 comments on commit fda55d0

Please sign in to comment.