Community Articles
Find and share helpful community-sourced technical articles
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)

HBaseFsck (hbck) is a tool for checking for region consistency and table integrity problems and repairing a corrupted HBase. It works in two basic modes — a read-only inconsistency identifying mode and a multi-phase read-write repair mode.

To check to see if your HBase cluster has corruptions, run hbck against your HBase cluster:

$ ./bin/hbase hbck

At the end of the commands output it prints OK or tells you the number of INCONSISTENCIES present. You may also want to run hbck a few times because some inconsistencies can be transient (e.g. cluster is starting up or a region is splitting). Operationally you may want to run hbck regularly and setup alert if it repeatedly reports inconsistencies . A run of hbck will report a list of inconsistencies along with a brief description of the regions and tables affected. The using the -details option will report more details including a representative listing of all the splits present in all the tables.

$ ./bin/hbase hbck -details

If you just want to know if some tables are corrupted, you can limit hbck to identify inconsistencies in only specific tables. For example the following command would only attempt to check table TableFoo and TableBar. The benefit is that hbck will run in less time.

$ ./bin/hbase hbck TableFoo TableBar

Best Practices:

● Redirect output to a file hbase hbck >>/tmp/hbck.txt

● Larger clusters run table specific hbck fixes

hbase hbck –fixMeta mytable

● Avoid running hbck with –repair flag.

Not applicable

For an article named "in depth" this a pretty shallow article. Considering the man page for hbck is longer than this article, I guess I expected a treatise on how to interpret the output, how to determine which fix parameters to run, etc.

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎04-01-2017 06:24 AM
Updated by:
Top Kudoed Authors