Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HBase RegionServer HA for all tables

HBase RegionServer HA for all tables

New Contributor

Hi,

From my understanding, to enable Regionserver HA (Reads HA) we need to:

  1. Enable HA at the cluster level : https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.4/bk_hadoop-ha/content/config-ha-reads-hbase....
  2. Create a table with HA : https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.4/bk_hadoop-ha/content/creating-ha-hbase-tabl...

Can someone confirm this?

How can I make all tables highly available by default? (ie. setting REGION_REPLICATION to a value > 1 automatically for all created tables) ?

Thanks

6 REPLIES 6
Highlighted

Re: HBase RegionServer HA for all tables

Super Collaborator

Default value is 1

public static final int DEFAULT_REGION_REPLICATION = 1;

Please set REGION_REPLICATION for every table you need HA.

Re: HBase RegionServer HA for all tables

New Contributor

@Ted Yu

This wasn't my question. How can I change the default REGION_REPLICATION from 1 to other value?

Re: HBase RegionServer HA for all tables

New Contributor

In this contexte: why we set hbase.meta.replica.count to 3 and then we need to set REGION_REPLICATION for each table ?

Re: HBase RegionServer HA for all tables

Super Collaborator

After changing DEFAULT_REGION_REPLICATION, you need to rebuild hbase.

Re: HBase RegionServer HA for all tables

Super Collaborator

Default for hbase:meta is also 1:

public static final String META_REPLICAS_NUM = "hbase.meta.replica.count";

public static final int DEFAULT_META_REPLICA_NUM = 1;

Re: HBase RegionServer HA for all tables

Expert Contributor

There is no way to set table replication > 1 without explicitly setting it at either table creation time or by altering table.

create 't1', 'f1', {REGION_REPLICATION => 2}

alter 't2', {REGION_REPLICATION => 2}

As mentioned before it is 1 by default. And for somewhat good reasons, each replication doubles the memory and storage utilization.

The property hbase.meta.replica.count applies to meta regions which are totally different from tables.