filesystem (Hbck2)
Reports on the health and integrity of HFiles, references, and links within the HBase filesystem.
Command Syntax
hbase hbck -j <path-to-hbck2-jar> filesystem [OPTIONS] [<TABLENAME>... | -i <INPUT_FILE>...]Options
| Option | Description |
|---|---|
-f, --fix | Moves corrupt HFiles, invalid references, and bad links to a sideline directory. |
-i, --inputFiles <file1> [<file2>...] | Specifies one or more files containing table names, one per line. |
Description
This command checks the HBase data directories on HDFS and reports issues such as:
- Corrupt or unreadable HFiles
- Broken or invalid internal references
- Bad links
- General data integrity problems in the filesystem
If you specify the --fix option, all problematic files and links are moved to a sideline directory so they no longer interfere with normal HBase operations.
The --fix option does not repair structural integrity issues such as:
- Missing regions (“holes”)
- Orphan regions (regions present on disk but not linked properly)
You can provide one or more table names to limit the scope of the check. If no tables are specified, the command scans all tables and also restores the hbase.version file if it is missing.
This command interacts only with the filesystem. Any regions whose files are modified by --fix must be reopened to pick up the changes.
Examples
- Report filesystem issues for all tables:
hbase hbck -j <path-to-hbck2-jar> filesystem- Fix filesystem issues for
mytable:
hbase hbck -j <path-to-hbck2-jar> filesystem --fix mytable- Report filesystem issues for tables listed in
fileName1:
hbase hbck -j <path-to-hbck2-jar> filesystem -i fileName1Was this page helpful?