lianglianggege

因为集群不互通,所以采用手动方式迁移

1、下载目标集群数据

hadoop fs -get /apps/hbase/data/data/default/*c4be21d3000064c0 /mnt/data

2、远程复制数据,可以压缩一下

scp ***

 

3、上传数据到HDFS,一定要切换到hbase用户,不然会有错误

su hdfs
hadoop fs -put /app/hbase/* /apps/hbase/data/data/default/

 

4、修复元数据等

hbase hbck 只做检查 
hbase hbck -fixMeta 根据region目录中的.regioninfo,生成meta表
hbase hbck -fixAssignments 把meta表中记录的region分配给regionserver 
hbase hbck -fixHdfsOrphans 修复.regioninfo文件
hbase hbck -repair  表名

 

遇到的问题:

There is a hole in the region chain between  and .  You need to create a new .regioninfo and region dir in hdfs to plug the hole

Found inconsistency in table

最后发现是上传数据到hdfs是没有使用hbase用户,修改文件owner后重新修复就好了

hadoop fs -chown -R hbase:hdfs /apps/hbase/data/data/default

hbase hbck -repair  表名

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-10-03
  • 2022-02-09
  • 2021-11-08
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2021-06-23
猜你喜欢
  • 2021-12-02
  • 2021-09-18
  • 2021-10-04
  • 2022-12-23
  • 2021-09-17
  • 2022-01-25
  • 2022-12-23
相关资源
相似解决方案