3.2. Creating HA Tables with the HBase Shell

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:

  1. Disable the HBase table that you want to enable with HA:

    hbase> disable 't1'

  2. Alter the table to replicate the table's primary region to one or more secondary regions:

    hbase> alter 't1', {REGION_REPLICATION => 2}

  3. Enable the table:

    hbase> enable 't1'


loading table of contents...