Details
Description
The current (0.90.5, 0.92.0rc2) versions of hbck detects most of region consistency and table integrity invariant violations. However with '-fix' it can only automatically repair region consistency cases having to do with deployment problems. This updated version should be able to handle all cases (including a new orphan regiondir case). When complete will likely deprecate the OfflineMetaRepair tool and subsume several open META-hole related issue.
Here's the approach (from the comment of at the top of the new version of the file).
/** * HBaseFsck (hbck) is a tool for checking and repairing region consistency and * table integrity. * * Region consistency checks verify that META, region deployment on * region servers and the state of data in HDFS (.regioninfo files) all are in * accordance. * * Table integrity checks verify that that all possible row keys can resolve to * exactly one region of a table. This means there are no individual degenerate * or backwards regions; no holes between regions; and that there no overlapping * regions. * * The general repair strategy works in these steps. * 1) Repair Table Integrity on HDFS. (merge or fabricate regions) * 2) Repair Region Consistency with META and assignments * * For table integrity repairs, the tables their region directories are scanned * for .regioninfo files. Each table's integrity is then verified. If there * are any orphan regions (regions with no .regioninfo files), or holes, new * regions are fabricated. Backwards regions are sidelined as well as empty * degenerate (endkey==startkey) regions. If there are any overlapping regions, * a new region is created and all data is merged into the new region. * * Table integrity repairs deal solely with HDFS and can be done offline -- the * hbase region servers or master do not need to be running. These phase can be * use to completely reconstruct the META table in an offline fashion. * * Region consistency requires three conditions -- 1) valid .regioninfo file * present in an hdfs region dir, 2) valid row with .regioninfo data in META, * and 3) a region is deployed only at the regionserver that is was assigned to. * * Region consistency requires hbck to contact the HBase master and region * servers, so the connect() must first be called successfully. Much of the * region consistency information is transient and less risky to repair. */
Attachments
Attachments
Issue Links
- duplicates
-
HBASE-4094 improve hbck tool to fix more hbase problem
- Closed
- is depended upon by
-
HBASE-5781 Zookeeper session got closed while trying to assign the region to RS using hbck -fix
- Closed
-
HBASE-5634 document how to use uberhbck
- Closed
- is related to
-
HBASE-1621 merge tool should work on online cluster
- Closed
-
HBASE-4379 [hbck] Does not complain about tables with no end region [Z,]
- Closed
- relates to
-
HBASE-5599 [hbck] handle NO_VERSION_FILE and SHOULD_NOT_BE_DEPLOYED inconsistencies
- Closed
-
HBASE-5719 Enhance hbck to sideline overlapped mega regions
- Closed
-
HBASE-5628 Improve performance of uberhbck
- Closed
-
HBASE-5630 hbck should disable the balancer using synchronousBalanceSwitch.
- Closed
- requires
-
HBASE-5563 HRegionInfo#compareTo should compare regionId as well
- Closed
-
HBASE-5588 Deprecate/remove AssignmentManager#clearRegionFromTransition
- Closed
-
HBASE-5589 Add of the offline call to the Master Interface
- Closed