You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2021/01/03 17:31:42 UTC

[hbase] branch branch-2 updated: Shenshengli hbase-25450 The parameter "hbase.bucketcache.size" is misdescribed (#2821)

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

stack 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 d2c1886  Shenshengli hbase-25450 The parameter "hbase.bucketcache.size" is misdescribed (#2821)
d2c1886 is described below

commit d2c1886bf4df5746c05af7bc9b82715ead0b9d8e
Author: 申胜利 <48...@users.noreply.github.com>
AuthorDate: Mon Jan 4 01:27:08 2021 +0800

    Shenshengli hbase-25450 The parameter "hbase.bucketcache.size" is misdescribed (#2821)
    
    Signed-off-by: Anoop Sam John <an...@apache.org>
    Signed-off-by: stack <st...@apache.org>
---
 hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java    | 4 +---
 hbase-common/src/main/resources/hbase-default.xml                     | 4 +---
 .../src/main/java/org/apache/hadoop/hbase/io/util/MemorySizeUtil.java | 2 +-
 src/main/asciidoc/_chapters/hbase-default.adoc                        | 1 +
 4 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index dc43e8a..f49a426 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -1429,9 +1429,7 @@ public final class HConstants {
   public static final String BUCKET_CACHE_IOENGINE_KEY = "hbase.bucketcache.ioengine";
 
   /**
-   * When using bucket cache, this is a float that EITHER represents a percentage of total heap
-   * memory size to give to the cache (if &lt; 1.0) OR, it is the capacity in
-   * megabytes of the cache.
+   * When using bucket cache, it is the capacity in megabytes of the cache.
    */
   public static final String BUCKET_CACHE_SIZE_KEY = "hbase.bucketcache.size";
 
diff --git a/hbase-common/src/main/resources/hbase-default.xml b/hbase-common/src/main/resources/hbase-default.xml
index a1827a2..db1e3df 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -1013,9 +1013,7 @@ possible configurations would overwhelm and obscure the important.
   <property>
     <name>hbase.bucketcache.size</name>
     <value></value>
-    <description>A float that EITHER represents a percentage of total heap memory
-    size to give to the cache (if &lt; 1.0) OR, it is the total capacity in
-    megabytes of BucketCache. Default: 0.0</description>
+    <description>It is the total capacity in megabytes of BucketCache. Default: 0.0</description>
   </property>
   <property>
     <name>hbase.bucketcache.bucket.sizes</name>
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/util/MemorySizeUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/util/MemorySizeUtil.java
index 471eb46..9104980 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/util/MemorySizeUtil.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/util/MemorySizeUtil.java
@@ -234,7 +234,7 @@ public class MemorySizeUtil {
   }
 
   /**
-   * @param conf used to read config for bucket cache size. (< 1 is treated as % and > is treated as MiB)
+   * @param conf used to read config for bucket cache size. 
    * @return the number of bytes to use for bucket cache, negative if disabled.
    */
   public static long getBucketCacheSize(final Configuration conf) {
diff --git a/src/main/asciidoc/_chapters/hbase-default.adoc b/src/main/asciidoc/_chapters/hbase-default.adoc
index 1472381..1c373e9 100644
--- a/src/main/asciidoc/_chapters/hbase-default.adoc
+++ b/src/main/asciidoc/_chapters/hbase-default.adoc
@@ -1239,6 +1239,7 @@ Whether or not the bucketcache is used in league with the LRU
 .Description
 Used along with bucket cache, this is a float that EITHER represents a percentage of total heap
    memory size to give to the cache (if < 1.0) OR, it is the capacity in megabytes of the cache.
+   (After HBase-2.0, "hbase.bucketcache.size" cannot be between 0-1)
 +
 .Default
 `0` when specified as a float