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

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


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

commit ebc1fab8824db46108fd9ba19b5c2778ce7c17a0
Author: Biju Nair <gs.b...@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 <psomo...@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 d030f83..e43824b 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
@@ -685,7 +685,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 999c7ba..c5a1b21 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
@@ -764,7 +764,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;

Reply via email to