Skip to content

Commit 83cc05a

Browse files
pustota2009virajjasani
authored andcommitted
HBASE-23887 Bug fix heavyEvictionMbSizeLimit (ADDENDUM) (#2957)
Signed-off-by: Viraj Jasani <[email protected]>
1 parent 79272e4 commit 83cc05a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,12 @@ public LruAdaptiveBlockCache(long maxSize, long blockSize, Configuration conf) {
388388
* @param singleFactor percentage of total size for single-access blocks
389389
* @param multiFactor percentage of total size for multiple-access blocks
390390
* @param memoryFactor percentage of total size for in-memory blocks
391+
* @param hardLimitFactor hard capacity limit
392+
* @param forceInMemory in-memory hfile's data block has higher priority when evicting
393+
* @param maxBlockSize maximum block size for caching
394+
* @param heavyEvictionCountLimit when starts AdaptiveLRU algoritm work
395+
* @param heavyEvictionMbSizeLimit how many bytes desirable putting into BlockCache
396+
* @param heavyEvictionOverheadCoefficient how aggressive AdaptiveLRU will reduce GC
391397
*/
392398
public LruAdaptiveBlockCache(long maxSize, long blockSize, boolean evictionThread,
393399
int mapInitialSize, float mapLoadFactor, int mapConcurrencyLevel,
@@ -434,7 +440,7 @@ public LruAdaptiveBlockCache(long maxSize, long blockSize, boolean evictionThrea
434440

435441
// check the bounds
436442
this.heavyEvictionCountLimit = Math.max(heavyEvictionCountLimit, 0);
437-
this.heavyEvictionMbSizeLimit = Math.max(heavyEvictionCountLimit, 1);
443+
this.heavyEvictionMbSizeLimit = Math.max(heavyEvictionMbSizeLimit, 1);
438444
this.cacheDataBlockPercent = 100;
439445
heavyEvictionOverheadCoefficient = Math.min(heavyEvictionOverheadCoefficient, 1.0f);
440446
heavyEvictionOverheadCoefficient = Math.max(heavyEvictionOverheadCoefficient, 0.001f);

0 commit comments

Comments
 (0)