Use the following procedure to enable HA for HBase:
Add the following configuration properties in the
hbase-site.xml
configuration file to enable HA for HBase:Table 11.1.
Configuration Property Description hbase.regionserver.storefile.refresh.period
The period, in milliseconds, for refreshing the store files for the Secondary Region Servers. The default value of 0
indicates that the feature is disabled. Secondary Region Servers receive new store files from the Primary Region Server after the Secondary Region Server refreshes the list of files in the region. However, 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 thehbase.master.loadbalancer.class
configuration property.hbase.master.loadbalancer.class
The Java class used for balancing the load of all HBase clients. The default value is org.apache.hadoop.hbase.masgter.balancer.StochasticLoadBalancer
, the only load balancer that supports reading data from Region Servers in secondary mode.hbase.ipc.client.allowsInterrupt
Whether to enable interruption of RPC threads at the client. The default value of true
is required to enable Primary Region Servers to access other Region Servers in secondary mode.hbase.client.primaryCallTimeout.get
The timeout period, in milliseconds, before an HBase client's RPCs, or remote procedure calls, are submitted to a Secondary Region Server with timeline data consistency. The default value is 10
.hbase.client.primaryCallTimeout.multiget
The timeout period, in milliseconds, before an HBase client's multi-get request, such as HTable.get(List<GET>))
, is submitted to a Secondary Region Server with timeline data consistency. The default value is10
. Lower values increase the number of RPCs but will also lower latency.Restart the HBase Master and Region Servers.