diff --git hbase-common/src/main/resources/hbase-default.xml hbase-common/src/main/resources/hbase-default.xml index a4e6578..b042b2d 100644 --- hbase-common/src/main/resources/hbase-default.xml +++ hbase-common/src/main/resources/hbase-default.xml @@ -780,6 +780,33 @@ possible configurations would overwhelm and obscure the important. index block in a multi-level block index grows to this size, the block is written out and a new block is started. + + hbase.bucketcache.ioengine + + Where to store the contents of the bucketcache. One of: onheap, + offheap, or file. If a file, set it to file:PATH_TO_FILE. See https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/io/hfile/CacheConfig.html for more information. + + + + hbase.bucketcache.combinedcache.enabled + true + Whether or not the bucketcache is used in league with the LRU + on-heap block cache. In this mode, indices and blooms are kept in the LRU + blockcache and the data blocks are kept in the bucketcache. + + + hbase.bucketcache.size + 65536 + The size of the buckets for the bucketcache if you only use a single size. + Defaults to the default blocksize, which is 64 * 1024. + + + hbase.bucketcache.sizes + + A comma-separated list of sizes for buckets for the bucketcache + if you use multiple sizes. Should be a list of block sizes in order from smallest + to largest. The sizes you use will depend on your data access patterns. + hfile.format.version 3 @@ -1068,7 +1095,7 @@ possible configurations would overwhelm and obscure the important. 0 The percentage of the off heap space (-XX:MaxDirectMemorySize) to be allocated towards the experimental off heap "SlabCache" (This is different to - the BucketCache -- see the package javadoc for org.apache.hadoop.hbase.io.hfile + the n Cache -- see the package javadoc for org.apache.hadoop.hbase.io.hfile for more on your options). If you desire the cache to be disabled, simply set this value to 0. diff --git src/main/docbkx/book.xml src/main/docbkx/book.xml index 603839c..5991a53 100644 --- src/main/docbkx/book.xml +++ src/main/docbkx/book.xml @@ -2398,6 +2398,20 @@ rs.close(); In other words, you configure the L1 LruBlockCache as you would normally, as you would when there is no L2 BucketCache present. + HBASE-10641 introduced the ability to configure multiple sizes for the + buckets of the bucketcache, in HBase 0.98 and newer. To configurable multiple bucket + sizes, configure the new property (instead of + ) to a comma-separated list of block sizes, + ordered from smallest to largest, with no spaces. The goal is to optimize the bucket + sizes based on your data access patterns. The following example configures buckets of + size 4096 and 8192. + + hfile.block.cache.sizes + 4096,8192 + + ]]> Direct Memory Usage In HBase The default maximum direct memory varies by JVM. Traditionally it is 64M