Using Apache HBase to store and access data
Also available as:
loading table of contents...

Configure BucketCache

To configure BucketCache, you have to specify values for certain parameters in the and hbase-site.xml files.

  1. In the file for each RegionServer, or in the file supplied to Ambari, set the -XX:MaxDirectMemorySize argument for HBASE_REGIONSERVER_OPTS to the amount of direct memory you want to allocate to HBase.

    In the sample configuration, the value would be 110592m (-XX:MaxDirectMemorySize accepts a number followed by a unit indicator; m indicates megabytes);

    HBASE_OPTS="$HBASE_OPTS -XX:MaxDirectMemorySize=110592m"

  2. In the hbase-site.xml file, specify the BucketCache size.

    For the sample configuration, the values would be 120832 and 0.89830508474576, respectively. You can round up the proportion. This allocates space related to the rounding error to the (larger) off-heap memory area.

  3. In the hbase-site.xml file, set hbase.bucketcache.ioengine to offheap to enable BucketCache:
  4. Restart (or perform a rolling restart on) the cluster. It can take a minute or more to allocate BucketCache, depending on how much memory you are allocating. Check logs for error messages.