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:08 UTC

[hbase] branch branch-2.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.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
     new 64ed902  HBASE-22363 Remove hardcoded number of read cache block buckets
64ed902 is described below

commit 64ed90286da16e1b5d8db1bf234cf35444743e80
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 c21935f..f8b724c 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
@@ -684,7 +684,7 @@ public class LruBlockCache implements ResizableBlockCache, HeapSize {
         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 e2263d9..8767646 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
@@ -798,7 +798,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;