hbase的snaptshot和replication

1:停hbase1,hbase2的balancer (负载均衡),并添加参数

hbase.replication
true

2:创建快照 hbase2
snapshot 'DBN_STO','DBN_STO'
3.同步数据 hbase2 ==》 hbase1
hbase org.apache.hadoop.hbase.snapshot.ExportSnapshot -snapshot DBN_4PX_sn -copy-from hdfs://10.15.36.6:8020/hyperbase2 -copy-to hdfs://10.15.36.3:8020/hyperbase1 -overwrite -mappers 8 -bandwidth 1024
3.在hbase1上,从快照恢复数据
clone_snapshot 'DBN_STO','DBN_STO'
4.#前置执行 重写设定想slave集群replication哪些表的哪些列族,只对列族REPLICATION_SCOPE=>'1'有效(邮政:列族:if)

猜你喜欢

转载自www.cnblogs.com/sqdb/p/12941994.html