filesystem (Hbck2)

Reports on the health and integrity of HFiles, references, and links within the HBase filesystem.

Command Syntax

Bash
Copy

Options

OptionDescription
-f, --fixMoves 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

  1. Report filesystem issues for all tables:
Bash
Copy
  1. Fix filesystem issues for mytable:
Bash
Copy
  1. Report filesystem issues for tables listed in fileName1:
Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated