You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2021/02/15 15:16:21 UTC

[hbase] branch branch-2 updated: HBASE-23887 Bug fix heavyEvictionMbSizeLimit (ADDENDUM) (#2957)

This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new d784e3f  HBASE-23887 Bug fix heavyEvictionMbSizeLimit (ADDENDUM) (#2957)
d784e3f is described below

commit d784e3f177673f3febadd95c0f3fc4952c6d8851
Author: pustota2009 <61...@users.noreply.github.com>
AuthorDate: Mon Feb 15 18:13:33 2021 +0300

    HBASE-23887 Bug fix heavyEvictionMbSizeLimit (ADDENDUM) (#2957)
    
    Signed-off-by: Viraj Jasani <vj...@apache.org>
---
 .../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.java
index 083f109..99a3a2b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.java
@@ -388,6 +388,12 @@ public class LruAdaptiveBlockCache implements FirstLevelBlockCache {
    * @param singleFactor        percentage of total size for single-access blocks
    * @param multiFactor         percentage of total size for multiple-access blocks
    * @param memoryFactor        percentage of total size for in-memory blocks
+   * @param hardLimitFactor     hard capacity limit
+   * @param forceInMemory       in-memory hfile's data block has higher priority when evicting
+   * @param maxBlockSize        maximum block size for caching
+   * @param heavyEvictionCountLimit   when starts AdaptiveLRU algoritm work
+   * @param heavyEvictionMbSizeLimit  how many bytes desirable putting into BlockCache
+   * @param heavyEvictionOverheadCoefficient  how aggressive AdaptiveLRU will reduce GC
    */
   public LruAdaptiveBlockCache(long maxSize, long blockSize, boolean evictionThread,
     int mapInitialSize, float mapLoadFactor, int mapConcurrencyLevel,
@@ -434,7 +440,7 @@ public class LruAdaptiveBlockCache implements FirstLevelBlockCache {
 
     // check the bounds
     this.heavyEvictionCountLimit = Math.max(heavyEvictionCountLimit, 0);
-    this.heavyEvictionMbSizeLimit = Math.max(heavyEvictionCountLimit, 1);
+    this.heavyEvictionMbSizeLimit = Math.max(heavyEvictionMbSizeLimit, 1);
     this.cacheDataBlockPercent = 100;
     heavyEvictionOverheadCoefficient = Math.min(heavyEvictionOverheadCoefficient, 1.0f);
     heavyEvictionOverheadCoefficient = Math.max(heavyEvictionOverheadCoefficient, 0.001f);