hbase ExportSnapshot迁移hbase表

在源集群上准备快照:

snapshot 'credit_dict','credit_dict_snapshot20221117'
list_snapshots

复制快照到目标集群:

hbase org.apache.hadoop.hbase.snapshot.ExportSnapshot \
-Dipc.client.fallback-to-simple-auth-allowed=true \
-snapshot credit_dict_snapshot20221117 \
-copy-from hdfs://50.2.68.116:8020/hbase \
-copy-to hdfs://192.168.24.96:8020/hbase \
-mappers 10 \
-bandwidth 10 
参数名 注释
-D ipc.client.fallback-to-simple-auth-allowed=true 允许安全认证的集群访问未开启kerberos的集群
-snapshot 指定要复制迁移的快照
-copy-from 要复制迁移快照的源集群地址
-copy-to 要复制迁移快照的目标集群地址
-mappers 开启多少个mappers任务
-bandwidth 限制导出快照时的带宽消耗,要求输入表示每秒兆字节的整数 单位(MB/sec)

还原数据到表中:

create "credit_dict",  {NAME =>"info"},SPLITS => ['10','20','30','40','50','60','70','80','90']
disable 'credit_dict'
restore_snapshot 'credit_dict_snapshot20221117'
enable 'credit_dict'

你可能感兴趣的:(hbase,hbase,大数据,hadoop)