修复HBase表(未分配区域正在转换) [英] Repair HBase table (unassigned region in transition)

查看:1013
本文介绍了修复HBase表(未分配区域正在转换)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点卡住修复一个有问题的表(在Hbase 0.92.1-cdh4.0.0,Hadoop 2.0.0-cdh4.0.0)。

一个未完成的转型地区:

 区域状态
bf2025f4bc154914b5942af4e72ea063 counter_traces,1329773878.35_766a0b4df75e4381a686fbc07db9e333,1339425291230.bf2025f4bc154914b5942af4e72ea063。 state = OFFLINE,ts = Tue Jun 12 11:43:53 CEST 2012(0s ago),server = null

当我运行 sudo -u hbase hbase hbck -repair 时,我得到这个:

  .META中空的REGIONINFO_QUALIFIER行的数量:0 
错误:区域{meta => counter_traces,1329773878.35_766a0b4df75e4381a686fbc07db9e333,1339425291230.bf2025f4bc154914b5942af4e72ea063。,hdfs => hdfs:// hbase001:8020 / hbase / counter_traces / bf2025f4bc154914b5942af4e72ea063,deployed => }未部署在任何区域服务器上。
尝试修复未分配的区域...
12/06/12 11:44:40 INFO util.HBaseFsckRepair:区域仍处于转换状态,正在等待它分配:{NAME => 'counter_traces,1329773878.35_766a0b4df75e4381a686fbc07db9e333,1339425291230.bf2025f4bc154914b5942af4e72ea063',STARTKEY => '1329773878.35_766a0b4df75e4381a686fbc07db9e333',ENDKEY => '1329793347.58_163865765c0a11e184ab003048f0e77e',ENCODED => bf2025f4bc154914b5942af4e72ea063,}

它只是循环。



如果我不做 -repair ,我得到这个:

  .META中空的REGIONINFO_QUALIFIER行的数量:0 
错误:区域{meta => counter_traces,1329773878.35_766a0b4df75e4381a686fbc07db9e333,1339425291230.bf2025f4bc154914b5942af4e72ea063。,hdfs => hdfs:// hbase001:8020 / hbase / counter_traces / bf2025f4bc154914b5942af4e72ea063,deployed => }未部署在任何区域服务器上。
错误:地区{meta => counter_traces,1329816776.95_95b5561f3c1e496598421359a19ac665,1339425297099.ee1fd808d954c9adc9ed95ec2f29d119。,hdfs => hdfs:// hbase001:8020 / hbase / counter_traces / ee1fd808d954c9adc9ed95ec2f29d119,deployed => }未部署在任何区域服务器上。
12/06/12 11:45:59 DEBUG util.HBaseFsck:有134个区域信息项
错误:1329773878.35_766a0b4df75e4381a686fbc07db9e333和1329793347.58_163865765c0a11e184ab003048f0e77e之间的区域链中存在漏洞。您需要在hdfs中创建一个新的.regioninfo和区域目录以堵塞漏洞。
错误:1329816776.95_95b5561f3c1e496598421359a19ac665和1329847231.75_b3c50776778b43e088dd7ed865e11331之间的区域链中存在漏洞。您需要在hdfs中创建一个新的.regioninfo和区域目录以堵塞漏洞。
错误:在table counter_traces中发现不一致

我运行了 - 修复几次之前,它有帮助。但这一次,
不再了。



好的,所以这表示要做一个手动干预来解决这个问题。可能有人
指向我如何做到这一点的正确方向?食谱,网页,例子,
任何东西都会有所帮助。



感谢,
马里奥

解决方案

/ p>

因此,一个地区陷入转型的原因之一是因为,当它跨区域服务器移动时,它将从源区域服务器取消分配,但永远不会分配给另一个RegionServer的。
对我而言,一种修复方法是强制从hbase shell中通过以下命令对其进行ASSIGNING: -

$ p $ assign regionName


I'm a bit stuck repairing a faulty table (on Hbase 0.92.1-cdh4.0.0, Hadoop 2.0.0-cdh4.0.0)

There is a region in transition that doesn't finish:

Region    State
bf2025f4bc154914b5942af4e72ea063 counter_traces,1329773878.35_766a0b4df75e4381a686fbc07db9e333,1339425291230.bf2025f4bc154914b5942af4e72ea063. state=OFFLINE, ts=Tue Jun 12 11:43:53 CEST 2012 (0s ago), server=null

When I run sudo -u hbase hbase hbck -repair, I get this:

Number of empty REGIONINFO_QUALIFIER rows in .META.: 0
ERROR: Region { meta => counter_traces,1329773878.35_766a0b4df75e4381a686fbc07db9e333,1339425291230.bf2025f4bc154914b5942af4e72ea063., hdfs => hdfs://hbase001:8020/hbase/counter_traces/bf2025f4bc154914b5942af4e72ea063, deployed =>  } not deployed on any region server.
Trying to fix unassigned region...
12/06/12 11:44:40 INFO util.HBaseFsckRepair: Region still in transition, waiting for it to become assigned: {NAME => 'counter_traces,1329773878.35_766a0b4df75e4381a686fbc07db9e333,1339425291230.bf2025f4bc154914b5942af4e72ea063.', STARTKEY => '1329773878.35_766a0b4df75e4381a686fbc07db9e333', ENDKEY => '1329793347.58_163865765c0a11e184ab003048f0e77e', ENCODED => bf2025f4bc154914b5942af4e72ea063,}

and it just loops.

If I don't do the -repair, I get this:

Number of empty REGIONINFO_QUALIFIER rows in .META.: 0
ERROR: Region { meta => counter_traces,1329773878.35_766a0b4df75e4381a686fbc07db9e333,1339425291230.bf2025f4bc154914b5942af4e72ea063., hdfs => hdfs://hbase001:8020/hbase/counter_traces/bf2025f4bc154914b5942af4e72ea063, deployed =>  } not deployed on any region server.
ERROR: Region { meta => counter_traces,1329816776.95_95b5561f3c1e496598421359a19ac665,1339425297099.ee1fd808d954c9adc9ed95ec2f29d119., hdfs => hdfs://hbase001:8020/hbase/counter_traces/ee1fd808d954c9adc9ed95ec2f29d119, deployed =>  } not deployed on any region server.
12/06/12 11:45:59 DEBUG util.HBaseFsck: There are 134 region info entries
ERROR: There is a hole in the region chain between 1329773878.35_766a0b4df75e4381a686fbc07db9e333 and 1329793347.58_163865765c0a11e184ab003048f0e77e.  You need to create a new .regioninfo and region dir in hdfs to plug the hole.
ERROR: There is a hole in the region chain between 1329816776.95_95b5561f3c1e496598421359a19ac665 and 1329847231.75_b3c50776778b43e088dd7ed865e11331.  You need to create a new .regioninfo and region dir in hdfs to plug the hole.
ERROR: Found inconsistency in table counter_traces

I've run -repair a couple of times before, and it helped. But this time, not anymore.

Ok, so this states to do a manual intervention to fix this. Could someone point me in the right direction on how to do this? A recipe, webpage, example, anything will help.

Thanks, Mario

解决方案

Mario,

So one of the reasons why a region gets stuck in transition is because, when it is being moved across regionservers, it is unassigned from the source regionserver but is never assigned to another regionserver. One fix that always works for me is by forcibly ASSIGNing it from the hbase shell by :-

assign regionName

这篇关于修复HBase表(未分配区域正在转换)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆