Create empty table on the destination cluster

You can create table on the destination cluster by extracting the schema using HBase Shell.

If the table to be replicated does not yet exist on the destination cluster, you must create it.

  1. On the source cluster, describe the tahble using HBase Shell.
    The ouput is reformatted for readability:
    hbase> describe acme_users
    
    Table acme_users is ENABLED
    acme_users
    COLUMN FAMILIES DESCRIPTION
    {NAME => 'user', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'NONE',
    REPLICATION_SCOPE => '0', VERSIONS => '3', COMPRESSION => 'NONE',
    MIN_VERSIONS => '0', TTL => 'FOREVER', KEEP_DELETED_CELLS => 'FALSE',
    BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'false'}
  2. Copy the output and make the following changes:
    • For the TTL, change FOREVER to org.apache.hadoop.hbase.HConstants::FOREVER.
    • Add the word CREATE before the table name.
    • Remove the line COLUMN FAMILIES DESCRIPTION and everything above the table name.
    A command like the following:
    "CREATE 'cme_users' ,
    
    {NAME => 'user', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'NONE',
    REPLICATION_SCOPE => '0', VERSIONS => '3', COMPRESSION => 'NONE',
    MIN_VERSIONS => '0', TTL => org.apache.hadoop.hbase.HConstants::FOREVER, KEEP_DELETED_CELLS => 'FALSE',
    BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'false'}
  3. Paste the command into HBase Shell on the destination cluster.
    The table is created.