Hbase replication操作

1.修改hbase-site.xml文件

<property>
 <name>hbase.replication</name>
 <value>true</value>
</property>

2.同步数据改变,重启hbase集群

3.创建备份表

hbae>create 'reptable1', { NAME => 'cf1', REPLICATION_SCOPE =>1}

3.hbase> add_peer '1', 'l-master1:2181:/hbase'

4.hbase> start_replication

5.验证是否在复制

hadoop jar $HBASE_HOME/hbase-0.92.1.jar verifyrep 1 reptable1

6.停止复制

hbase> stop_replication

7.hbase> remove_peer '1'

原文地址:https://www.cnblogs.com/cl1024cl/p/6205108.html