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 2020/04/26 10:51:31 UTC
[hbase] branch branch-2 updated: HBASE-23264 Resolve a TODO of BucketAllocator: "Why we add the extra … (#801)
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 ee5283e HBASE-23264 Resolve a TODO of BucketAllocator: "Why we add the extra … (#801)
ee5283e is described below
commit ee5283ee82ab68f6a0d86e422ff09de26e63c982
Author: bsglz <18...@qq.com>
AuthorDate: Sun Apr 26 17:45:31 2020 +0800
HBASE-23264 Resolve a TODO of BucketAllocator: "Why we add the extra … (#801)
Signed-off-by: Viraj Jasani <vj...@apache.org>
---
.../java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
index 2883ff2..bbbce76 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
@@ -269,8 +269,9 @@ public final class BucketAllocator {
// Default block size in hbase is 64K, so we choose more sizes near 64K, you'd better
// reset it according to your cluster's block size distribution
+ // The real block size in hfile maybe a little larger than the size we configured ,
+ // so we need add extra 1024 bytes for fit.
// TODO Support the view of block size distribution statistics
- // TODO: Why we add the extra 1024 bytes? Slop?
private static final int DEFAULT_BUCKET_SIZES[] = { 4 * 1024 + 1024, 8 * 1024 + 1024,
16 * 1024 + 1024, 32 * 1024 + 1024, 40 * 1024 + 1024, 48 * 1024 + 1024,
56 * 1024 + 1024, 64 * 1024 + 1024, 96 * 1024 + 1024, 128 * 1024 + 1024,