开发者社区> 问答> 正文

hbase表删除后hdfs上数据文件已经没了,但是meta表仍然存在region信息

hbase表删除后hdfs上数据文件已经没了,但是meta表仍然存在region信息,导致一直提示表rit,请问有遇到过这个情况的吗?怎么解决的?hbase版本是2.0.0,删除都是用的hbase admin api,标准删除流程,先disabled然后再drop

展开
收起
Pafii 2020-08-26 20:07:46 3010 0
1 条回答
写回答
取消 提交回答
  • HBCK一致性 一致性是指Region在meta中的meta表信息、在线Regionserver的Region信息和hdfs的Regioninfo的Region信息的一致。

    二. 一致性的检查和修复命令 一致性检查命令

    hbase hbck <-details> <表名> 一致性修复

    hbase hbck <-fixMeta> ,<-fixAssignments> <表名> 命令详解

    -fixAssignments:Try to fix region assignments. Replaces the old -fix

                 不同情况,动作不一样,包括下线、关闭和重新上线
    

    -fixMeta:Try to fix meta problems. This assumes HDFS region info is good.

                主要以hdfs为准进行修复,hdfs存在则添加到meta中,不存在删除meta对应region。
    

    三.异常定位和修复 region在meta、regionserver和hdfs三者都有哪些不一致?怎么修复?

    可以根据下面的异常清单进行异常定位和修复

    UnConsistency

                                        Exception Info
    

    Repair

                                                              Region Is Not In Hbase:Meta
    

    Region信息在meta数据和hdfs都不存在,但是却被部署到Regionserver。

    errors.reportError(ERROR_CODE.NOT_IN_META_HDFS, "Region " + descriptiveName + ", key=" + key + ", not on HDFS or in hbase:meta but " + "deployed on " + Joiner.on(", ").join(hbi.deployedOn));

      FixAssignments
    

    Region在meta数据表不存在,也没有被部署到Regionserver,但是数据在hdfs上。

    errors.reportError(ERROR_CODE.NOT_IN_META_OR_DEPLOYED, "Region " + descriptiveName + " on HDFS, but not listed in hbase:meta " + "or deployed on any Region server"

    FixMeta FixAssignments Region在meta数据表不存在,但是在Regionserver部署,数据在hdfs上。

    errors.reportError(ERROR_CODE.NOT_IN_META, "Region " + descriptiveName + " not in META, but deployed on " + Joiner.on(", ").join(hbi.deployedOn));

    1.FixMeta

    2.FixAssignments

                                                                     Region Is In Hbase:Meta
    

    Region只存在meta中,但在hdfs和rs上都不存在

    errors.reportError(ERROR_CODE.NOT_IN_HDFS_OR_DEPLOYED, "Region " + descriptiveName + " found in META, but not in HDFS " + "or deployed on any Region server.")

    FixMeta

    Region在meta表和Regionserver中存在,但是在hdfs不存在。

    errors.reportError(ERROR_CODE.NOT_IN_HDFS, "Region " + descriptiveName + " found in META, but not in HDFS, " + "and deployed on " + Joiner.on(", ").join(hbi.deployedOn));

    FixAssignments 2.FixMeta

    Region在meta表和hdfs中存在,且Region所在表没有处于disable状态,但是没有部署。

    errors.reportError(ERROR_CODE.NOT_DEPLOYED, "Region " + descriptiveName + " not deployed on any Region server.");

    FixAssignments

    Region处于disabling或disabled

    errors.reportError(ERROR_CODE.SHOULD_NOT_BE_DEPLOYED, "Region " + descriptiveName + " should not be deployed according " + "to META, but is deployed on " + Joiner.on(", ").join(hbi.deployedOn));

    FixAssignments

    Region多分配

    errors.reportError(ERROR_CODE.MULTI_DEPLOYED, "Region " + descriptiveName + " is listed in hbase:meta on Region server " + hbi.metaEntry.RegionServer + " but is multiply assigned to Region servers " + Joiner.on(", ").join(hbi.deployedOn));

    FixAssignments

    Region在meta表的Regionserver信息与实际部署的Regionserver不一致。

    errors.reportError(ERROR_CODE.SERVER_DOES_NOT_MATCH_META, "Region " + descriptiveName + " listed in hbase:meta on Region server " + hbi.metaEntry.RegionServer + " but found on Region server " + hbi.deployedOn.get(0));

    FixAssignments

    父region在meta和hdfs存在,且处于切分状态,但子region的信息在meta信息缺失。

    errors.reportError(ERROR_CODE.LINGERING_SPLIT_PARENT, "Region " + descriptiveName + " is a split parent in META, in HDFS, " + "and not deployed on any region server. This could be transient, " + "consider to run the catalog janitor first!");

    2021-02-24 11:10:38
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
大数据时代的存储 ——HBase的实践与探索 立即下载
Hbase在滴滴出行的应用场景和最佳实践 立即下载
阿里云HBase主备双活 立即下载