Hadoop运维日常

HBase跨集群数据迁移的一种方法

2018-09-09  本文已影响67人  咖啡大象不含咖啡

从源hbase集群中复制出HBase数据库表到本地目录

亦可使用distcp将集群复制至目标集群
具体办法参考:DistCp

修复.META.表和重新分配数据到各RegionServer

在.META.表没修复时执行重新分配,会报错

#hbase hbck -fixAssignment
...
ERROR: Region { meta => null, hdfs => hdfs://h185:54310/hbase/toplist_ware_total_1009_201232/0403552001eb2a31990e443dcae74ee8, deployed =>  } on HDFS, but not listed in META or deployed on any region server
...

先修复.META.表

#hbase hbck -fixMeta

重新分配到各分区服务器

# hbase hbck -fixAssignments

将刷一下类型日志

12/08/14 18:28:01 INFO util.HBaseFsckRepair: Region still in transition, waiting for it to become assigned: {NAME => 'toplist_ware_total_1009_201232,,1344187094829.0403552001eb2a31990e443dcae74ee8.', STARTKEY => '', ENDKEY => '', ENCODED => 0403552001eb2a31990e443dcae74ee8,}
12/08/14 18:28:02 INFO util.HBaseFsckRepair: Region still in transition, waiting for it to become assigned: {NAME => 'toplist_ware_total_1009_201232,,1344187094829.0403552001eb2a31990e443dcae74ee8.', STARTKEY => '', ENDKEY => '', ENCODED => 0403552001eb2a31990e443dcae74ee8,}

参考:
distcp相关问题可以参考以下博客:https://www.jianshu.com/p/cbace52602aa

上一篇 下一篇

猜你喜欢

热点阅读