EsgynDB 清理不一致对象
EsgynDB中每个对象主要由于底层的HBase对象和上层的元数据组合,把一个Key-Value格式的HBase对象可以映射成为二维的关系型的表。
目前EsgynDB是可能会有某些异常场景下会导致底层的HBase对象和上层的元数据之间匹配异常,这可能主要有以下几种情况,
1、HBase对象存在,元数据坏了。
2、元数据正常,HBase对象坏了。
3、元数据和HBase对象都坏了。
我们可以分别从EsgynDB层面和HBase层面来验证检查是元数据出现问题还是底层HBase对象出现问题。
如果在EsgynDB中查看表异常但从HBase shell中查看是正常,那说明元数据有问题。如果在HBase shell下面list或scan表本身就有问题,那么底层HBase对象已经异常了。
遇到这种不一致对象的时候,我们通常有几种方法来处理,
cleanup; --使用cleanup命令来清理不一致对象。当查看表提示"Invalid state"的时候,报错信息提示使用cleanup来清理。
cleanup metadata, return details; --有时候cleanup也不成功,使用cleanup时说不存在,重新创建又说已经存在。此时我们可以使用cleanup metadata,return details来清理。在清理之前,我们可以先使用checkup metadata, check, return details来检查不一致的对象,然后再执行真正的清理动作。
以下是一个典型的输出结果,SQL>cleanup metadata, check, return details;
DDL_OUTPUT
--------------------------------------------------------------------------------------------------------------------------------
Metadata Cleanup: started, check only
Start: Cleanup Orphan Objects Entries
Entry #1(OBJECT): TRAFODION.V7DEV.KCFB_CFDSZJ_IDX2
End: Cleanup Orphan Objects Entries (1 entry found)
Start: Cleanup Orphan Hbase Entries
Entry #1(OBJECT): TRAFODION._ORDER_SG_.ORDER_SEQ_GEN
End: Cleanup Orphan Hbase Entries (1 entry found)
Start: Cleanup Inconsistent Objects Entries
Entry #1(UID): 8743960677227587338
Entry #2(UID): 8743960677227587584
Entry #3(UID): 8743960677227587723
Entry #4(UID): 8743960677227587952
Entry #5(UID): 8743960677227588447
Entry #6(UID): 8743960677227588587
Entry #7(UID): 8743960677227588726
Entry #8(UID): 8743960677227588866
Entry #9(UID): 8743960677227589024
Entry #10(UID): 8743960677227589160
Entry #11(UID): 8743960677227589296
Entry #12(UID): 8743960677227589435
Entry #13(UID): 8743960677227589575
Entry #14(UID): 8743960677227589712
Entry #15(UID): 8743960677227589849
Entry #16(UID): 8743960677227589987
Entry #17(UID): 8743960677227590126
Entry #18(UID): 8743960677227590266
Entry #19(UID): 8743960677227590406
Entry #20(UID): 8743960677227590545
Entry #21(UID): 8743960677227590685
Entry #22(UID): 8743960677227590827
End: Cleanup Inconsistent Objects Entries (22 entries found)
Start: Cleanup Inconsistent Views Entries
End: Cleanup Inconsistent Views Entries ( entries found)
Start: Cleanup Inconsistent Hive Entries
End: Cleanup Inconsistent Hive Entries ( entries found)
Start: Cleanup Inconsistent Privilege Entries
End: Cleanup Inconsistent Privilege Entries ( entries found)
Start: Cleanup Inconsistent User Group Entries
End: Cleanup Inconsistent User Group Entries ( entries found)
Metadata Cleanup: done
--- SQL operation complete.
SQL>cleanup metadata,return details;
DDL_OUTPUT
--------------------------------------------------------------------------------------------------------------------------------
Metadata Cleanup: started
Start: Cleanup Orphan Objects Entries
Entry #1(OBJECT): TRAFODION.V7DEV.KCFB_CFDSZJ_IDX2
End: Cleanup Orphan Objects Entries (1 entry cleaned up)
Start: Cleanup Orphan Hbase Entries
Entry #1(OBJECT): TRAFODION._ORDER_SG_.ORDER_SEQ_GEN
End: Cleanup Orphan Hbase Entries (1 entry cleaned up)
Start: Cleanup Inconsistent Objects Entries
Entry #1(UID): 8743960677227587338
Entry #2(UID): 8743960677227587584
Entry #3(UID): 8743960677227587723
Entry #4(UID): 8743960677227587952
Entry #5(UID): 8743960677227588447
Entry #6(UID): 8743960677227588587
Entry #7(UID): 8743960677227588726
Entry #8(UID): 8743960677227588866
Entry #9(UID): 8743960677227589024
Entry #10(UID): 8743960677227589160
Entry #11(UID): 8743960677227589296
Entry #12(UID): 8743960677227589435
Entry #13(UID): 8743960677227589575
Entry #14(UID): 8743960677227589712
Entry #15(UID): 8743960677227589849
Entry #16(UID): 8743960677227589987
Entry #17(UID): 8743960677227590126
Entry #18(UID): 8743960677227590266
Entry #19(UID): 8743960677227590406
Entry #20(UID): 8743960677227590545
Entry #21(UID): 8743960677227590685
Entry #22(UID): 8743960677227590827
End: Cleanup Inconsistent Objects Entries (22 entries cleaned up)
Start: Cleanup Inconsistent Views Entries
End: Cleanup Inconsistent Views Entries ( entries cleaned up)
Start: Cleanup Inconsistent Hive Entries
End: Cleanup Inconsistent Hive Entries ( entries cleaned up)
Start: Cleanup Inconsistent Privilege Entries
End: Cleanup Inconsistent Privilege Entries ( entries cleaned up)
Start: Cleanup Inconsistent User Group Entries
End: Cleanup Inconsistent User Group Entries ( entries cleaned up)
Metadata Cleanup: done
————————————————
原文链接:https://blog.csdn.net/Post_Yuan/article/details/106588389
相关文章