addFsRegionsMissingInMeta (Hbck2)

Use the addFsRegionsMissingInMeta command to re-add regions to the hbase:meta table when the corresponding region directories exist in HDFS but are missing from hbase:meta.

This issue often occurs if hbck1 OfflineMetaRepair was run against an HBase 2.x cluster.

hbase:meta must be online for this command to work.

Command

Copy

Options

OptionDescription
-i, --inputFiles <file1> [<file2>...]Take one or more files containing namespace or table names (one per line) as input.
-o, --outputFile <name|prefix>Name/prefix of the file(s) to dump region names. These output files can then be used as input for the assigns command.
-n, --numLines <arg>Number of lines (maximum) to be written to each output file when used in conjunction with -o. If -o is specified but -n is not, all region names will be dumped into a single file.

What the Command Does

  1. Compares regions listed in hbase:meta with region directories in HDFS\
  2. Identifies regions missing from hbase:meta\
  3. Recreates region entries by reading their regioninfo from HDFS\
  4. Inserts them into hbase:meta in CLOSED state (not assigned, not cached)

Post-Run Actions

  • Run the printed assign commands to bring the re-created regions online
  • For HBase < 2.3.0, perform a rolling HMaster restart
  • before* running assignments

Usage Examples

Example 1

Copy

Example 2

Copy

Example 3

Copy
  • reportMissingRegionsInMeta\
  • fixMeta
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated