Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

hbase hbck - repair/fix

avatar
Rising Star

sometimes in our environment, when selecting from a hbase table there is error. so we usually run "hbase hbck" (without any further parameters) and check for inconsistencies. If we see any inconsistency we usually restart the hbase master/region services and then run "hbase hbck" again and check the output. Most of the time the inconsistencies are gone.

So where and in what circumstance do we use options of "hbase hbck" like repair and fix?

appreciate the insights.

1 ACCEPTED SOLUTION

avatar
Expert Contributor

---->Basically command "hbase hbck <options>" provides multiple options to fix different kind of inconsistencies.

Examples :

-fix Try to fix region assignments. This is for backwards compatiblity

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

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

-noHdfsChecking Don't load/check region info from HDFS. Assumes hbase:meta region info is good. Won't check/fix any HDFS issue, e.g. hole, orphan, or overlap

-fixHdfsHoles Try to fix region holes in hdfs.

-fixHdfsOrphans Try to fix region dirs with no .regioninfo file in hdfs

----> repair option is Shortcut which fixes mutiple inconsistencies.

Options/Description:

Metadata Repair shortcuts

-repair Shortcut for -fixAssignments -fixMeta -fixHdfsHoles -fixHdfsOrphans -fixHdfsOverlaps -fixVersionFile -sidelineBigOverlaps -fixReferenceFiles -fixHFileLinks -fixTableLocks -fixOrphanedTableZnodes

-repairHoles Shortcut for -fixAssignments -fixMeta -fixHdfsHoles

You can run below command to see all possible options and their meanings:

hbase hbck -help

This Link has also details of the hbck - https://hbase.apache.org/book.html#hbck.in.depth and when to run.

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

---->Basically command "hbase hbck <options>" provides multiple options to fix different kind of inconsistencies.

Examples :

-fix Try to fix region assignments. This is for backwards compatiblity

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

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

-noHdfsChecking Don't load/check region info from HDFS. Assumes hbase:meta region info is good. Won't check/fix any HDFS issue, e.g. hole, orphan, or overlap

-fixHdfsHoles Try to fix region holes in hdfs.

-fixHdfsOrphans Try to fix region dirs with no .regioninfo file in hdfs

----> repair option is Shortcut which fixes mutiple inconsistencies.

Options/Description:

Metadata Repair shortcuts

-repair Shortcut for -fixAssignments -fixMeta -fixHdfsHoles -fixHdfsOrphans -fixHdfsOverlaps -fixVersionFile -sidelineBigOverlaps -fixReferenceFiles -fixHFileLinks -fixTableLocks -fixOrphanedTableZnodes

-repairHoles Shortcut for -fixAssignments -fixMeta -fixHdfsHoles

You can run below command to see all possible options and their meanings:

hbase hbck -help

This Link has also details of the hbck - https://hbase.apache.org/book.html#hbck.in.depth and when to run.

avatar
Expert Contributor

@n c Did you above information helped you.

If yes, Please accept answer.