hbase 集群迁移:Region still in transition, waiting for it to become assigned:
来源:互联网 发布:QQ浏览器MINI JAVA 编辑:程序博客网 时间:2024/05/19 19:14
1. 在数据源集群执行 :
hadoop distcp /hbase/data/* hdfs://172.16.4.81/hbase/data/
2. 在目标集群执行 :
修改目标文件chown hdfs dfs -chown -R /hbase/data
3. 之后执行
hbase hbck -repair
hbase hbck -fixAssignments
执行过程中失败,Region still in transition, waiting for it to become assigned:
参照其他文章依然没有解决,然后自己发现,表的hbase:meta 已经有 regioninfo 信息,但是scan 时候报错,
ERROR: No server address listed in hbase:meta for region
参照第二步 ,修改文件所有者以及所有者组。成功解决该问题。
排查过程中参考如下步骤
一、从源hbase集群中复制出HBase数据库表到本地目录
http://abloz.com/2012/08/14/another-method-of-the-data-of-the-Hbase-cross-cluster-replication.html
最好停止hbase,否则可能会丢部分数据
[hbase@hadoop200 ~]$ hadoop fs -get /hbase/toplist_ware_total_1009_201232 toplist_ware_total_1009_201232
压缩
[hbase@hadoop200 ~]$ tar zcvf topl.tar.gz toplist_ware_total_1009_201232
远程复制到目标机器
[hbase@hadoop200 ~]$ scp topl.tar.gz zhouhh@h185:~/.
二、目标HBase导入
解压
[zhouhh@h185 ~]$ tar zxvf topl.tar.gz
如果目标HBase里有这个表,需disable并drop掉。如果有该目录,则用Hadoop fs -rmr /hbase/table的方式删除,再往HDFS上复制。以免数据出错。
放到集群下面
[zhouhh@h185 ~]$ fs -put toplist_ware_total_1009_201232 /hbase[zhouhh@h185 ~]$
此时可以list出来,但scan报错
hbase(main):055:0> list 'toplist_ware_total_1009_201232'TABLEtoplist_ware_total_1009_2012321 row(s) in 0.0220 secondshbase(main):062:0> scan 'toplist_ware_total_1009_201232'ROW COLUMN+CELLERROR: Unknown table toplist_ware_total_1009_201232!
.META.表里面没有相关记录
hbase(main):064:0> scan ‘.META.’
里面没有toplist_ware_total_1009_201232 开头的行
三、修复.META.表和重新分配数据到各RegionServer
在.META.表没修复时执行重新分配,会报错
[zhouhh@h185 ~]$ hbase hbck -fixAssignments...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.表
[zhouhh@h185 ~]$ hbase hbck -fixMeta...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 server12/08/14 18:25:15 INFO util.HBaseFsck: Patching .META. with .regioninfo: {NAME => 'toplist_ware_total_1009_201232,,1344187094829.0403552001eb2a31990e443dcae74ee8.', STARTKEY => '', ENDKEY => '', ENCODED => 0403552001eb2a31990e443dcae74ee8,}...此时.META.表已经有表的数据了,但scan还是失败hbase(main):065:0> scan '.META.'ROW COLUMN+CELL...toplist_ware_total_1009_201232,,134418709 column=info:regioninfo, timestamp=1344939930752, value={NAME => 'toplist_ware_total_1009_201232,,1344187094829.0403552001eb 4829.0403552001eb2a31990e443dcae74ee8. 2a31990e443dcae74ee8.', STARTKEY => '', ENDKEY => '', ENCODED => 0403552001eb2a31990e443dcae74ee8,}16 row(s) in 0.0550 secondsscan还是失败hbase(main):066:0> scan 'toplist_ware_total_1009_201232'ROW COLUMN+CELLERROR: org.apache.hadoop.hbase.client.NoServerForRegionException: No server address listed in .META. for region toplist_ware_total_1009_201232,,1344187094829.0403552001eb2a31990e443dcae74ee8. containing row
重新分配到各分区服务器
[zhouhh@h185 ~]$ hbase hbck -fixAssignments...ERROR: Region { meta => toplist_ware_total_1009_201232,,1344187094829.0403552001eb2a31990e443dcae74ee8., hdfs => hdfs://h185:54310/hbase/toplist_ware_total_1009_201232/0403552001eb2a31990e443dcae74ee8, deployed => } not deployed on any region server.Trying to fix unassigned region...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,}12/08/14 18:28:04 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:05 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,}...
scan成功!
hbase(main):067:0> scan 'toplist_ware_total_1009_201232'ROW COLUMN+CELL 0000000001 column=info:loginid, timestamp=1344187147972, value=jjm167258611 0000000001 column=info:nick, timestamp=1344187147972, value=?\xE9\x97\xB4?\xE6\xB5\xA3? 0000000001 column=info:score, timestamp=1344187147972, value=200 0000000001 column=info:userid, timestamp=1344187147972, value=167258611...330 row(s) in 0.8630 seconds
如果目标集群是空的,则可以直接将源HBase的/hbase目录复制出来,然后在目标HBase系统上fs -rmr /hbase 或fs -mv /hbase /hbase1
然后用hadoop fs -put hbase / 即可
阅读全文
0 0
- hbase 集群迁移:Region still in transition, waiting for it to become assigned:
- Hbase Region still in transition修复
- server 2 task(s) are sleeping waiting for space to become available in the log segment for database tempdb.
- unregister_netdevice: waiting for eth1 to become free?错误
- Hbase region in transition多个场景解决
- Hbase集群client执行报错:Unable to find region for TABLE,,99999999999999 after 10 tries.
- <转>HBase运维实践-聊聊RIT的那点事-RIT(Region-In-Transition)
- 黑苹果 安装卡在 GeforceSensors:still waiting for accelerator to start
- Hbase Region迁移过程详解
- HBase waiting for dfs to exit safe model
- redis集群 Waiting for the cluster to join 一直等待
- How long does it take to become proficient in Java as you are new in programing
- HBase-Regions in Transition 问题
- Hbase集群迁移
- Hbase集群迁移
- Failed to place enough replicas, still in need of 1 to reach 3. For more information。。。。
- HBASE我遇坑之client.AsyncProcess: #1, waiting for 5012 actions to finish
- Hbase的NoServerForRegionException: Unable to find region for talk,,99999999999999 after 10 tries问题
- php断点上传
- Jquery插件supersized.js
- JS中创建函数的几种方法
- 习题 5.16 输出星号菱形图案
- UVALive
- hbase 集群迁移:Region still in transition, waiting for it to become assigned:
- 注册头条号时怎么选择领域
- markdown编译器(自己对照学习用)
- 【OpenGL】Shader技巧集合
- 单选框 单击选中,再击取消,和 提示 选择单选框
- 公有密钥和私有密钥加密
- Android Service完全解析,关于服务你所需知道的一切(下)
- Markdown编辑器使用说明
- leetcode 540. Single Element in a Sorted Array