hbase表删除后hdfs上数据文件已经没了,但是meta表仍然存在region信息,导致一直提示表rit,请问有遇到过这个情况的吗?怎么解决的?hbase版本是2.0.0,删除都是用的hbase admin api,标准删除流程,先disabled然后再drop
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!");
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。