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

stack pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new eef0768  Shenshengli hbase-25450 The parameter 
"hbase.bucketcache.size" is misdescribed (#2821)
eef0768 is described below

commit eef076828a0954b51fdae558b29351d1d6afe680
Author: 申胜利 <[email protected]>
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 <[email protected]>
    Signed-off-by: stack <[email protected]>
---
 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 05782fc..9a6912a 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
@@ -1400,9 +1400,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 def502a..9092dd1 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -1033,9 +1033,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 8cbc2dc..32dfb16 100644
--- a/src/main/asciidoc/_chapters/hbase-default.adoc
+++ b/src/main/asciidoc/_chapters/hbase-default.adoc
@@ -1242,6 +1242,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

Reply via email to