Hbase Region下线故障修复

当发现HBASE的某张表无法正常访问,或scan时:

发现故障后,检查hbase(以student表为例):

[hadoop@hadoop112 ~]$ hbase hbck -details student

结果重要部分如下:

Summary:
Table student is okay.
    Number of regions: 0
    Deployed on: 
Table hbase:meta is okay.
    Number of regions: 1
    Deployed on:  hadoop113,16020,1565925904060
0 inconsistencies detected.

尝试修复:

1.先禁用表
[hadoop@hadoop112 logs]$ hbase shell
hbase(main):007:0> disable 'student'

2.使用修复命令
[hadoop@hadoop112 logs]$ hbase hbck -fixMeta

3.重启启用表
[hadoop@hadoop112 logs]$ hbase shell
hbase(main):007:0> enable 'student'

然后再检查HBase

[hadoop@hadoop112 ~]$ hbase hbck -details student

运行结果如下:

Summary:
2019-08-16 11:46:53,299 INFO  [main-EventThread] zookeeper.ClientCnxn: EventThread shut down
Table student is okay.
    Number of regions: 1
    Deployed on:  hadoop113,16020,1565925904060
Table hbase:meta is okay.
    Number of regions: 1
    Deployed on:  hadoop113,16020,1565925904060
0 inconsistencies detected.
Status: OK

修复成功!!!

你可能感兴趣的:(HBase)