hbase找不到现有的表 [英] hbase cannot find an existing table
问题描述
我设置了一个hbase集群来存储来自opentsdb的数据。最近由于重新启动了一些节点,hbase丢失了表tsdb。我仍然可以在hbase的主节点页面,但是当我点击它,它给了我一个tableNotFoundException
org.apache。 hadoop.hbase.TableNotFoundException:tsdb
at org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:952)
at org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegion(HConnectionManager.java:818)
在org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegion(HConnectionManager.java:782)
在org.apache.hadoop.hbase .client.HTable.finishSetup(HTable.java:249)
在org.apache.hadoop.hbase.client.HTable。< init>(HTable.java:213)
在org.apache。 hadoop.hbase.client.HTable。< init>(HTable.java:171)
......
我进入了hbase shell,试图找到'tsdb'表,但得到了类似的信息
HBase的(主):018:0&克吨;扫描'tsdb'
ROW COLUMN + CELL
错误:未知表tsdb!
然而,当我试图重新创建这个表时,hbase shell告诉我表已经存在。 。
hbase(main):013:0>创建'tsdb',{NAME => 't',VERSIONS => 1,BLOOMFILTER =>'ROW'}
错误:表已存在:tsdb!
我也可以在hbase shell中列出表格
hbase(main):001:0> list
TABLE
tsdb
tsdb -uid
2行(s)在0.6730秒
看看日志,我发现这应该成为我的问题的原因
2012-05-14 12:06:22,140 WARN org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation:预取META表时遇到问题:
org.apache.hadoop.hbase.TableNotFoundException:找不到行在.META。对于表:tsdb,row = tsdb ,, 99999999999999
at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:157)
at org.apache.hadoop.hbase.client .MetaScanner.access $ 000(MetaScanner.java:52)
在org.apache.hadoop.hbase.client.MetaScanner $ 1.connect(MetaScanner.java:130)
在org.apache.hadoop.hbase .client.MetaScanner $ 1.connect(MetaScanner.java:127)
它表示找不到tsbb行在.META中,但在.META中确实有tsdb行。
hbase(main):002:0> ''META''
ROW COLUMN + CELL
tsdb,\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00 \x00\x0E\x00\ column = info:regioninfo,timestamp = 1336311752799,value = {NAME => tsdb,\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E\x00\x00\x02\ x00 \x00\x12\x00\x00\x03\x00\x00\x13\x00\x00\x
x00\x02\x00\x00\ x12 \x00\x00\x03\x00\x00\x13\x00\x00\x05\x00 05\x00\x001,1336311752340.7cd0d2205d9ae5fcadf843972ec74ec5',STARTKEY => \x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E\x00\x00\x02\x00\\ \\ x00 \x12\x00\x00\x03\x00\x00\x13\x00\
\x001,1336311752340.7cd0d2205d9ae5fcadf843972ec74ec5。 x00 \x05\x00\x001',ENDKEY => \x00\x00\x10O\xA3\x8C\x80\x00\x00\x01\x00\x00\x0B\x00\x00\x02\x00\\ \\ x00 \x19\x00\x00\x03\x00\x00\x1A\x00\x00\x05\x00\x001',ENCODED => 7cd0d2205d9ae5f
cadf843972ec74ec5,}
tsdb,\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E \x00\ column = info:server,timestamp = 1337011527000,value = brycobapd01.usnycbt.amrs.bankofamerica.com:60020
x00\x02\x00\x00\x12\x00\ x00 \x03\x00\x00\x13\x00\x00\x05\x00
\x001,1336311752340.7cd0d2205d9ae5fcadf843972ec74ec5。
tsdb,\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E\x00\ column = info :serverstartcode,timestamp = 1337011527000,value = 1337011518948
......
tsdb-uid ,, 1336081042372.a30d8074431c6a31c6a0a30e61fedefa。 column = info:server,timestamp = 1337011527458,value = bry200163111d.usnycbt.amrs.bankofamerica.com:60020
tsdb-uid ,, 1336081042372.a30d8074431c6a31c6a0a30e61fedefa。 column = info:serverstartcode,timestamp = 1337011527458,value = 1337011519807
6行0.2950秒
这是在群集上运行hbck后的结果
错误:Region hdfs:// slave-节点1:9000 / hbase / tsdb / 249438af5657bf1881a837c23997747e在HDFS上,但未在META中列出或在任何区域服务器上部署
错误:区域hdfs:// slave-node-1:9000 / hbase / tsdb / 4f8c65fb72910870690b94848879db1c HDFS,但未在META中列出或在任何区域服务器上部署
错误:HDFS上的区域hdfs:// slave-node-1:9000 / hbase / tsdb / 63276708b4ac9f11e241aca8b56e9def但未在META中列出或部署在任何区域服务器
错误:HDFS上的区域hdfs:// slave-node-1:9000 / hbase / tsdb / e54ee4def67d7f3b6dba75a3430e0544,但未在META中列出或部署在任何区域服务器上
错误:(区域tsdb,\\ \\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E\x00\x00\x02\x00\\ \\ x00 \x12\x00\x00\x03\x00\x00\x13\x00\x00\x05\x00\x001,1336311752340.7cd0d2205d9ae5fcadf843972ec74ec5。)第一个区域应该以空键。您需要在HDFS中创建一个新的区域和regioninfo以堵塞漏洞。
错误:在表tsdb
中发现不一致总结:
-ROOT-没问题。
区域数量:1
部署在:master-node,60020,1337011518948
.META。没关系。
地区数量:1
部署在:slave-node-2,60020,1337011519845
表tsdb不一致。
地区数量:5
部署在:slave-node-2,60020,1337011519845 slave-node-1,60020,1337011519807 master-node,60020,1337011518948
tsdb-uid是好的。
区域数量:1
部署在:slave-node-1,60020,1337011519807
检测到5个不一致。
状态:不一致
我已经运行
bin / hbase hbck -fix
不幸的是没有解决我的问题
有人可以帮我解决这个问题
- 是否有可能恢复此表tsdb?
- 如果1不能完成,是否建议正确删除'tsdb'并创建一个新的?
- 如果有人能让我知道什么是最重要的重启节点的方式,我将不胜感激。目前,我总是离开我的主节点。对于其他节点,我在重新启动后立即运行此命令。
命令:
#启动数据节点
bin / hadoop-daemon.sh启动datanode
bin / hadoop-daemon.sh启动jobtracker
#启动hbase
bin / hbase-daemon.sh start zookeeper
bin / hbase-daemon.sh start regionserver
非常感谢!
我不是很确定您为什么无法扫描它。但是,要重新创建表格,您可以尝试以下操作:
1)手动删除该表格中.META表格中的所有条目,并
2)从HDFS删除与此表相对应的目录
尝试在此之后重新创建表。
I set up a hbase cluster to store data from opentsdb. Recently due to reboot of some of the nodes, hbase lost the table "tsdb". I can still it on hbase's master node page, but when I click on it, it gives me a tableNotFoundException
org.apache.hadoop.hbase.TableNotFoundException: tsdb
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:952)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:818)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:782)
at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:249)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:213)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
......
I entered hbase shell, trying to locate 'tsdb' table, but got the similar message
hbase(main):018:0> scan 'tsdb'
ROW COLUMN+CELL
ERROR: Unknown table tsdb!
However when I tried to re-create this table, hbase shell told me the table already exist...
hbase(main):013:0> create 'tsdb', {NAME => 't', VERSIONS => 1, BLOOMFILTER=>'ROW'}
ERROR: Table already exists: tsdb!
And I can also list the table in hbase shell
hbase(main):001:0> list
TABLE
tsdb
tsdb-uid
2 row(s) in 0.6730 seconds
Taking a look at the log, I found this which should be the cause of my issue
2012-05-14 12:06:22,140 WARN org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation: Encountered problems when prefetch META table:
org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in .META. for table: tsdb, row=tsdb,,99999999999999
at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:157)
at org.apache.hadoop.hbase.client.MetaScanner.access$000(MetaScanner.java:52)
at org.apache.hadoop.hbase.client.MetaScanner$1.connect(MetaScanner.java:130)
at org.apache.hadoop.hbase.client.MetaScanner$1.connect(MetaScanner.java:127)
It says cannot find row of tsbb in .META., but there are indeed tsdb rows in .META.
hbase(main):002:0> scan '.META.'
ROW COLUMN+CELL
tsdb,\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E\x00\ column=info:regioninfo, timestamp=1336311752799, value={NAME => 'tsdb,\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E\x00\x00\x02\x00\x00\x12\x00\x00\x03\x00\x00\x13\x00\x00\x
x00\x02\x00\x00\x12\x00\x00\x03\x00\x00\x13\x00\x00\x05\x00 05\x00\x001,1336311752340.7cd0d2205d9ae5fcadf843972ec74ec5.', STARTKEY => '\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E\x00\x00\x02\x00\x00\x12\x00\x00\x03\x00\x00\x13\x00\
\x001,1336311752340.7cd0d2205d9ae5fcadf843972ec74ec5. x00\x05\x00\x001', ENDKEY => '\x00\x00\x10O\xA3\x8C\x80\x00\x00\x01\x00\x00\x0B\x00\x00\x02\x00\x00\x19\x00\x00\x03\x00\x00\x1A\x00\x00\x05\x00\x001', ENCODED => 7cd0d2205d9ae5f
cadf843972ec74ec5,}
tsdb,\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E\x00\ column=info:server, timestamp=1337011527000, value=brycobapd01.usnycbt.amrs.bankofamerica.com:60020
x00\x02\x00\x00\x12\x00\x00\x03\x00\x00\x13\x00\x00\x05\x00
\x001,1336311752340.7cd0d2205d9ae5fcadf843972ec74ec5.
tsdb,\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E\x00\ column=info:serverstartcode, timestamp=1337011527000, value=1337011518948
......
tsdb-uid,,1336081042372.a30d8074431c6a31c6a0a30e61fedefa. column=info:server, timestamp=1337011527458, value=bry200163111d.usnycbt.amrs.bankofamerica.com:60020
tsdb-uid,,1336081042372.a30d8074431c6a31c6a0a30e61fedefa. column=info:serverstartcode, timestamp=1337011527458, value=1337011519807
6 row(s) in 0.2950 seconds
Here is the result after I ran "hbck" on the cluster
ERROR: Region hdfs://slave-node-1:9000/hbase/tsdb/249438af5657bf1881a837c23997747e on HDFS, but not listed in META or deployed on any region server
ERROR: Region hdfs://slave-node-1:9000/hbase/tsdb/4f8c65fb72910870690b94848879db1c on HDFS, but not listed in META or deployed on any region server
ERROR: Region hdfs://slave-node-1:9000/hbase/tsdb/63276708b4ac9f11e241aca8b56e9def on HDFS, but not listed in META or deployed on any region server
ERROR: Region hdfs://slave-node-1:9000/hbase/tsdb/e54ee4def67d7f3b6dba75a3430e0544 on HDFS, but not listed in META or deployed on any region server
ERROR: (region tsdb,\x00\x00\x0FO\xA2\xF1\xD0\x00\x00\x01\x00\x00\x0E\x00\x00\x02\x00\x00\x12\x00\x00\x03\x00\x00\x13\x00\x00\x05\x00\x001,1336311752340.7cd0d2205d9ae5fcadf843972ec74ec5.) First region should start with an empty key. You need to create a new region and regioninfo in HDFS to plug the hole.
ERROR: Found inconsistency in table tsdb
Summary:
-ROOT- is okay.
Number of regions: 1
Deployed on: master-node,60020,1337011518948
.META. is okay.
Number of regions: 1
Deployed on: slave-node-2,60020,1337011519845
Table tsdb is inconsistent.
Number of regions: 5
Deployed on: slave-node-2,60020,1337011519845 slave-node-1,60020,1337011519807 master-node,60020,1337011518948
tsdb-uid is okay.
Number of regions: 1
Deployed on: slave-node-1,60020,1337011519807
5 inconsistencies detected.
Status: INCONSISTENT
I have run
bin/hbase hbck -fix
which unfortunately does not solve my problem
Could someone help me out on this that
- Is it possible to recover this table "tsdb"?
- If 1 cannot be done, is it a suggested way to gracefully remove 'tsdb', and create a new one?
- I'd be greatly appreciated if anybody can let me know what is the most suggested way to reboot a node? Currently, I am leaving my master node always up. For other nodes, I run this command immediately after its reboot.
command:
# start data node
bin/hadoop-daemon.sh start datanode
bin/hadoop-daemon.sh start jobtracker
# start hbase
bin/hbase-daemon.sh start zookeeper
bin/hbase-daemon.sh start regionserver
Many Thanks!
I am not very sure why you are unable to scan it. However, to recreate the table, you can try this:
1) Delete all entries in the .META table for this table manually, and
2) Delete the directory corresponding to this table from HDFS
Try creating the table again after that.
这篇关于hbase找不到现有的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!