Create HA tables using the HBase shell using the REGION_REPLICATION
keyword, as shown in the following example:
CREATE 't1', 'f1', {REGION_REPLICATION => 2}
This example creates a table named t1
that is replicated to one
secondary region. To replicate t1
to two secondary regions, specify
{REGION_REPLICATION => 3}
.
Application developers can also enable an existing table for HA with the
ALTER
HBase command:
Disable the HBase table that you want to enable with HA:
hbase> disable 't1'
Alter the table to replicate the table's primary region to one or more secondary regions:
hbase> alter 't1', {REGION_REPLICATION => 2}
Enable the table:
hbase> enable 't1'