HBASE-11717 Remove unused config 'hbase.offheapcache.percentage' from hbase-default.xml and book. (Anoop)

This commit is contained in:
anoopsjohn 2014-08-14 23:47:03 +05:30
parent 6367074381
commit cabcb6ca23
6 changed files with 3 additions and 66 deletions

View File

@ -1063,15 +1063,6 @@ possible configurations would overwhelm and obscure the important.
<value>false</value>
<description>Use Thrift TCompactProtocol binary serialization protocol.</description>
</property>
<property>
<name>hbase.offheapcache.percentage</name>
<value>0</value>
<description>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
for more on your options). If you desire the cache to be disabled, simply set this
value to 0.</description>
</property>
<property>
<name>hbase.data.umask.enable</name>
<value>false</value>

View File

@ -111,7 +111,6 @@ public class CacheConfig {
public static final boolean DEFAULT_BUCKET_CACHE_COMBINED = true;
public static final int DEFAULT_BUCKET_CACHE_WRITER_THREADS = 3;
public static final int DEFAULT_BUCKET_CACHE_WRITER_QUEUE = 64;
public static final float DEFAULT_BUCKET_CACHE_COMBINED_PERCENTAGE = 0.9f;
/**
* Configuration key to prefetch all blocks of a given file into the block cache

View File

@ -115,9 +115,6 @@ public class TestTableSnapshotInputFormat extends TableSnapshotInputFormatTestBa
"Snapshot job should be configured for default LruBlockCache.",
HConstants.HFILE_BLOCK_CACHE_SIZE_DEFAULT,
job.getFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, -1), 0.01);
Assert.assertEquals(
"Snapshot job should not use SlabCache.",
0, job.getFloat("hbase.offheapcache.percentage", -1), 0.01);
Assert.assertEquals(
"Snapshot job should not use BucketCache.",
0, job.getFloat("hbase.bucketcache.size", -1), 0.01);

View File

@ -162,9 +162,6 @@ public class TestTableSnapshotInputFormat extends TableSnapshotInputFormatTestBa
"Snapshot job should be configured for default LruBlockCache.",
HConstants.HFILE_BLOCK_CACHE_SIZE_DEFAULT,
job.getConfiguration().getFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, -1), 0.01);
Assert.assertEquals(
"Snapshot job should not use SlabCache.",
0, job.getConfiguration().getFloat("hbase.offheapcache.percentage", -1), 0.01);
Assert.assertEquals(
"Snapshot job should not use BucketCache.",
0, job.getConfiguration().getFloat("hbase.bucketcache.size", -1), 0.01);

View File

@ -2082,8 +2082,8 @@ rs.close();
xml:id="block.cache">
<title>Block Cache</title>
<para>HBase provides three different BlockCache implementations: the default onheap
LruBlockCache, BucketCache, and SlabCache, which are both (usually) offheap. This section
<para>HBase provides two different BlockCache implementations: the default onheap
LruBlockCache and BucketCache, which is (usually) offheap. This section
discusses benefits and drawbacks of each implementation, how to choose the appropriate
option, and configuration options for each.</para>
@ -2099,9 +2099,7 @@ rs.close();
<para><classname>LruBlockCache</classname> is the original implementation, and is
entirely within the Java heap. <classname>BucketCache</classname> is mainly
intended for keeping blockcache data offheap, although BucketCache can also
keep data onheap and serve from a file-backed cache. There is also an older
offheap BlockCache, called SlabCache that has since been deprecated and
removed in HBase 1.0.
keep data onheap and serve from a file-backed cache.
</para>
<para>Fetching will always be slower when fetching from BucketCache,
@ -2292,30 +2290,6 @@ rs.close();
<section
xml:id="offheap.blockcache">
<title>Offheap Block Cache</title>
<section xml:id="offheap.blockcache.slabcache">
<title>How to Enable SlabCache</title>
<para><emphasis>SlabCache is deprecated and will be removed in 1.0!</emphasis></para>
<para> SlabCache is originally described in <link
xlink:href="http://blog.cloudera.com/blog/2012/01/caching-in-hbase-slabcache/">Caching
in Apache HBase: SlabCache</link>. Quoting from the API documentation for <link
xlink:href="http://hbase.apache.org/0.94/apidocs/org/apache/hadoop/hbase/io/hfile/DoubleBlockCache.html">DoubleBlockCache</link>,
the hosting class for SlabCache deploys,
DoubleBlockCache is an abstraction layer that combines two caches, the smaller onHeapCache and the
larger offHeapCache. CacheBlock attempts to cache the block in both caches, while
readblock reads first from the faster on heap cache before looking for the block in
the off heap cache. Metrics are the combined size and hits and misses of both
caches.</para>
<para>To enable SlabCache, set the float
<varname>hbase.offheapcache.percentage</varname> to some value between 0 and 1 in
the <filename>hbase-site.xml</filename> file on the RegionServer. The value will be multiplied by the
setting for <varname>-XX:MaxDirectMemorySize</varname> in the RegionServer's
<filename>hbase-env.sh</filename> configuration file and the result is used by
SlabCache as its offheap store. The onheap store will be the value of the float
<varname>HConstants.HFILE_BLOCK_CACHE_SIZE_KEY</varname> setting (some value between
0 and 1) multiplied by the size of the allocated Java heap.</para>
<para>Restart (or rolling restart) your cluster for the configurations to take effect.
Check logs for errors or unexpected behavior.</para>
</section>
<section xml:id="enable.bucketcache">
<title>How to Enable BucketCache</title>
<para>The usual deploy of BucketCache is via a managing class that sets up two caching tiers: an L1 onheap cache

View File

@ -428,27 +428,6 @@ Successfully completed Log splitting
setup a secure HBase is on the way. </para>
</section>
<section
xml:id="slabcache">
<title>Experimental off-heap cache: SlabCache</title>
<para> A new cache was contributed to 0.92.0 to act as a solution between using the
“on-heap” cache which is the current LRU cache the region servers have and the
operating system cache which is out of our control. To enable
<emphasis>SlabCache</emphasis>, as this feature is being called, set
“-XX:MaxDirectMemorySize” in hbase-env.sh to the value for maximum direct memory
size and specify <property>hbase.offheapcache.percentage</property> in
<filename>hbase-site.xml</filename> with the percentage that you want to
dedicate to off-heap cache. This should only be set for servers and not for clients.
Use at your own risk. See this blog post, <link
xlink:href="http://www.cloudera.com/blog/2012/01/caching-in-hbase-slabcache/">Caching
in Apache HBase: SlabCache</link>, for additional information on this new
experimental feature. </para>
<para>This feature has mostly been eclipsed in later HBases. See <link
xlink:href="https://issues.apache.org/jira/browse/HBASE-7404 ">HBASE-7404 Bucket
Cache:A solution about CMS,Heap Fragment and Big Cache on HBASE</link>,
etc.</para>
</section>
<section>
<title>Changes in HBase replication </title>
<para>0.92.0 adds two new features: multi-slave and multi-master replication. The way to