hbase错误记录之 disable表卡住
现象
通过hbase shell disable表,显示表以及关闭,但是使用disabletable_name,却显示表状态为disableing,不能正常使用。
分析
1)通过以下命令查看表状态:
hbase> is_disabled table_name
false
hbase> is_enabled table_name
false
通过查看表的状态发现,当前表既没有开启也没有关闭。
2)查看当前表对应的元数据
hbase> get "hbase:meta","table_name","table:state"
可以发现value为\x08\x02,正常的值是\x08\x00(Enabled)或者\x08\x01(Disabled)
常见的Control Characters
解决:
方式1:修改表元数据
通过修改hbase meta表里面对应表的状态,这种方式目前试了一下,貌似对我这边没什么用。具体的思路如下:
修改hbase:meta 把表对应的状态置为开启或者关闭状态
hbase> put "hbase:meta","table_name","table:state",value="\b\0"
查看是否被修改
hbase> get "hbase:meta","table_name","table_state"
查看表状态
hbase> is_disabled table_name
false
hbase> is_enabled table_name
true