You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ps...@apache.org on 2019/07/31 07:52:05 UTC

[hbase] branch branch-2 updated: HBASE-22363 Remove hardcoded number of read cache block buckets

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

psomogyi 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 d335c97  HBASE-22363 Remove hardcoded number of read cache block buckets
d335c97 is described below

commit d335c97081f59a7fda4caf78432c22ec3da99ba2
Author: Biju Nair <gs...@gmail.com>
AuthorDate: Sun May 5 00:10:28 2019 -0400

    HBASE-22363 Remove hardcoded number of read cache block buckets
    
    Signed-off-by: Peter Somogyi <ps...@apache.org>
---
 .../src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java   | 2 +-
 .../main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
index 79ec0a3..f93a651 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
@@ -742,7 +742,7 @@ public class LruBlockCache implements FirstLevelBlockCache {
         bucketQueue.add(bucketMulti);
         bucketQueue.add(bucketMemory);
 
-        int remainingBuckets = 3;
+        int remainingBuckets = bucketQueue.size();
 
         BlockBucket bucket;
         while ((bucket = bucketQueue.poll()) != null) {
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index e6fd742..b8ebca8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -786,7 +786,7 @@ public class BucketCache implements BlockCache, HeapSize {
       bucketQueue.add(bucketMulti);
       bucketQueue.add(bucketMemory);
 
-      int remainingBuckets = 3;
+      int remainingBuckets = bucketQueue.size();
       long bytesFreed = 0;
 
       BucketEntryGroup bucketGroup;