From 2326af89974a67f5f9f784475fbc23ef4f15007c Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Sun, 15 Apr 2018 12:05:08 -0700 Subject: [PATCH] HBASE-20416 [DOC] Fix hbck option intros --- src/main/asciidoc/_chapters/hbck_in_depth.adoc | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/main/asciidoc/_chapters/hbck_in_depth.adoc b/src/main/asciidoc/_chapters/hbck_in_depth.adoc index 1e1f9fb..6ac60c5 100644 --- a/src/main/asciidoc/_chapters/hbck_in_depth.adoc +++ b/src/main/asciidoc/_chapters/hbck_in_depth.adoc @@ -151,9 +151,25 @@ These options let you override the default thresholds and to enable the large re * `-sidelineBigOverlaps` if more than maxMerge regions are overlapping, sideline attempt to sideline the regions overlapping with the most other regions. * `-maxOverlapsToSideline ` if sidelining large overlapping regions, sideline at most n regions. +=== Fix Inconsistent References and Links + +A region may fail to open if there are lingering reference HFiles that points to regions no longer exist. + +Similarly, if HDFS-level corruption occurs and HDFS fsck deletes files with missing blocks, it could cause some dangling HFileLinks. +These dangling HFileLinks may also prevent a region from open. + +Two hbck operations are provided to sideline these files so that region can be opened. + +* `-fixReferenceFiles` check lingering reference HFiles that point to regions no longer exist, and sideline them. +* `-fixHFileLinks` check and sideline dangling HFileLink. + +=== Fix it all + Since often times you would just want to get the tables repaired, you can use this option to turn on all repair options: * `-repair` includes all the region consistency options and only the hole repairing table integrity options. +Namely, `-repair` is equivalent to +`-fixAssignments -fixMeta -fixHdfsHoles -fixHdfsOrphans -fixHdfsOverlaps -fixVersionFile -sidelineBigOverlaps -fixReferenceFiles -fixHFileLinks`. Finally, there are safeguards to limit repairs to only specific tables. For example the following command would only attempt to check and repair table TableFoo and TableBar. @@ -167,11 +183,11 @@ $ ./bin/hbase hbck -repair TableFoo TableBar There are a few special cases that hbck can handle as well. Sometimes the meta table's only region is inconsistently assigned or deployed. -In this case there is a special `-fixMetaOnly` option that can try to fix meta assignments. +In this case there is a special `-metaonly` option that can try to fix meta assignments. ---- -$ ./bin/hbase hbck -fixMetaOnly -fixAssignments +$ ./bin/hbase hbck -metaonly -fixAssignments ---- ==== Special cases: HBase version file is missing @@ -207,6 +223,6 @@ But HBase can't clean them up. In this case, you can use the `-fixSplitParents` option to reset them in META to be online and not split. Therefore, hbck can merge them with other regions if fixing overlapping regions option is used. -This option should not normally be used, and it is not in `-fixAll`. +This option should not normally be used, and it is not in `-repair`. :numbered: -- 2.5.3