Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Modify hbase-env.sh on all HBase nodes to include the HBase coprocessor in the classpath:

    Code Block
    export HBASE_CLASSPATH="$HBASE_CLASSPATH:/<cdap-home>/<hbase-compat-version>/coprocessor/*"
    
    # <cdap-home> will vary depending on your distribution and installation
    #
    For Cloudera Manager/CDH: it is "${PARCEL_ROOT}/CDAP" where ${PARCEL_ROOT} is your configured "Parcel Directory"
    # Ambari/HDP, MapR, packages: it is "/opt/cdap"
    # # <hbase-compat-version> is the HBase package compatible with the distribution
    
    # For example, if you are on a Cloudera Manager cluster with CDH 5.5.x:
    export HBASE_CLASSPATH="$HBASE_CLASSPATH:/opt/cloudera/parcels/CDAP/hbase-compat-1.0-cdh5.5.0/coprocessor/*"
  • Restart HBase master and regionservers.

  • Enable replication from master to slave:

    Code Block
    master_hbase_shell> add_peer '[slave-name]', '[slave-zookeeper-quorum]:/[slave-zk-node]'
    
    # For example:
    master_hbase_shell> add_peer 'slave', 'slave.example.com:2181:/hbase'
  • Enable replication from slave to master:

    Code Block
    slave_hbase_shell> add_peer '[master-name]', '[master-zookeeper-quorum]:/[master-zk-node]'
    
    # For example:
    slave_hbase_shell> add_peer 'master', 'master.example.com:2181:/hbase'
  • Confirm that HBase replication is working:

    Code Block
    master_hbase_shell> create 'repltest', 'f'
    slave_hbase_shell> create 'repltest', 'f'
    master_hbase_shell> enable_table_replication 'repltest'
    slave_hbase_shell> alter 'repltest', { 'NAME' => 'f', 'REPLICATION_SCOPE' => 1 }
    master_hbase_shell> put 'repltest', 'masterrow', 'f:v1', 'v1'
    slave_hbase_shell> put 'repltest', 'slaverow', 'f:v1', 'v1'
    master_hbase_shell> scan 'repltest'
    slave_hbase_shell> scan 'repltest'

...