Acceldata
ODP

Last updated: Sep 24, 2026 06:53 UTC

addFsRegionsMissingInMeta (Hbck2)

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

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

Info

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


Command

hbase hbck -j <path-to-Hbck2-jar> addFsRegionsMissingInMeta [OPTIONS] [<NAMESPACE|NAMESPACE:TABLENAME>... | -i <INPUTFILES>...]


Options

Option

Description

-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

  • Compares regions listed in hbase:meta with region directories in HDFS\
  • Identifies regions missing from hbase:meta\
  • Recreates region entries by reading their regioninfo from HDFS\
  • 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

hbase hbck -j <path-to-Hbck2-jar> addFsRegionsMissingInMeta default:tbl_1 n1:tbl_2 n2

Example 2

hbase hbck -j <path-to-Hbck2-jar> addFsRegionsMissingInMeta -i fileName1 fileName2

Example 3

hbase hbck -j <path-to-Hbck2-jar> addFsRegionsMissingInMeta \
-o outputFilePrefix \
-n 100 \
-i fileName1 fileName2


Related Commands

  • reportMissingRegionsInMeta\
  • fixMeta