This is an automated email from the ASF dual-hosted git repository. psomogyi pushed a commit to branch branch-1.4 in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1.4 by this push: new 31161c3 HBASE-22363 Remove hardcoded number of read cache block buckets 31161c3 is described below commit 31161c3ddbfe3ecc2efc1bf9868791528550884e 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 a2d38e0..5a4ac13 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;