2. Enabling HA Reads for HBase

Use the following procedure to enable HA for HBase:

  1. Add the following server-side properties in the hbase-site.xml configuration file for the HBase server:

     

    Table 9.1. Server-side HBase HA Configuration Properties

    Configuration PropertyDescription
    hbase.regionserver.storefile.refresh.periodThe period, in milliseconds, for refreshing the data store files of secondary regions. The default value of 0 indicates that the HA feature is disabled. Note that too frequent refreshes can place an additional load on the NameNode. Read requests are rejected if these store files cannot be refreshed for longer than the HFILE TTL period specifed with the hbase.master.loadbalancer.class configuration property.
    hbase.master.loadbalancer.classThe Java class used for balancing the load of all HBase clients. The default value is org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer, the only load balancer that supports reading data from secondary regions.


  2. Add the following client-side properties in the hbase-site.xml configuration properties for the HBase client:

     

    Table 9.2. Client-side HBase HA Configuration Properties

    Configuration PropertyDescription
    hbase.ipc.client.allowsInterruptWhether to enable interruption of the Remote Procedure Call, or RPC, threads for the client. The default value of true is required to enable primary regions to access secondary regions.
    hbase.client.primaryCallTimeout.getThe timeout period, in milliseconds, before the RPCs for an HBase client are submitted to a secondary region with timeline data consistency. The default value is 10.
    hbase.client.primaryCallTimeout.multigetThe timeout period, in milliseconds, before the RPCs for an HBase client's multi-get request, such as HTable.get(List<GET>)), is submitted to a secondary region with timeline data consistency. The default value is 10. Lower values increase the number of RPCs but will also lower latency.


  3. Restart the HBase servers.


loading table of contents...