[
https://issues.apache.org/jira/browse/HBASE-28600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17903856#comment-17903856
]
JinHyuk Kim commented on HBASE-28600:
-------------------------------------
h2. Developer Testing
h4. Case 1
{code:java}
$ ./bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool hfile.block.cache.size
0.4
$ ./bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool
hfile.block.cache.memory.size
null
$ HBASE_HEAPSIZE=4G ./bin/start-hbase.sh {code}
HBase logs
{code:java}
INFO [main] hfile.BlockCacheFactory: Allocating BlockCache size=1.60 GB,
blockSize=64 KB{code}
h4. Case 2
{code:java}
$ ./bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool hfile.block.cache.size
0.2
$ ./bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool
hfile.block.cache.memory.size
null
$ HBASE_HEAPSIZE=4G ./bin/start-hbase.sh {code}
HBase logs
{code:java}
INFO [main] hfile.BlockCacheFactory: Allocating BlockCache size=819.20 MB,
blockSize=64 KB{code}
h4. Case 3
{code:java}
$ ./bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool hfile.block.cache.size
0.2
$ ./bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool
hfile.block.cache.memory.size
512m
$ HBASE_HEAPSIZE=4G ./bin/start-hbase.sh {code}
HBase logs
{code:java}
INFO [main] hfile.BlockCacheFactory: Allocating BlockCache size=512 MB,
blockSize=64 KB{code}
h4. Case 4
{code:java}
$ ./bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool hfile.block.cache.size
0.4
$ ./bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool
hfile.block.cache.memory.size
5g
$ HBASE_HEAPSIZE=4G ./bin/start-hbase.sh {code}
Exception occurred
{code:java}
Caused by: java.lang.RuntimeException: Current heap configuration for MemStore
and BlockCache exceeds the threshold required for successful cluster operation.
The combined value cannot exceed 0.8. Please check the settings for
hbase.regionserver.global.memstore.size and either
hfile.block.cache.memory.size or hfile.block.cache.size in your configuration.
hbase.regionserver.global.memstore.size=0.4, hfile.block.cache.memory.size=5g,
hfile.block.cache.size=0.4. (Note: If both hfile.block.cache.memory.size and
hfile.block.cache.size are set, the system will use
hfile.block.cache.memory.size) at
org.apache.hadoop.hbase.io.util.MemorySizeUtil.checkForClusterFreeHeapMemoryLimit(MemorySizeUtil.java:105)
~[classes/:?] at
org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:513)
~[classes/:?] at
jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
~[?:?] at
jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
~[?:?] at
jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
~[?:?] at
java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
~[?:?] at java.lang.reflect.Constructor.newInstance(Constructor.java:480)
~[?:?] at
org.apache.hadoop.hbase.util.JVMClusterUtil.createRegionServerThread(JVMClusterUtil.java:85)
~[classes/:4.0.0-alpha-1-SNAPSHOT]{code}
> Enable setting blockcache on-heap sizes in bytes
> ------------------------------------------------
>
> Key: HBASE-28600
> URL: https://issues.apache.org/jira/browse/HBASE-28600
> Project: HBase
> Issue Type: Improvement
> Components: regionserver
> Reporter: Nick Dimiduk
> Assignee: JinHyuk Kim
> Priority: Major
> Labels: pull-request-available
>
> Specifying blockcache and memcache sizes as a percentage of heap is not
> always ideal. Sometimes it's easier to specify exact values rather than
> backing into a percentage. Let's introduce new configuration settings
> (perhaps named similarly to {{hbase.bucketcache.size}}) that accept byte
> values. Even nicer would be if these settings accepted human-friendly byte
> values like {{512m}} or {{10g}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)