reportMissingRegionsInMeta (Hbck2)
Reports regions that exist as directories in HDFS but are missing from hbase:meta. This command is check-only and performs no repairs. The hbase:meta table must be online to run this command.
Command Syntax
hbase hbck -j <path-to-hbck2-jar> reportMissingRegionsInMeta [<NAMESPACE | NAMESPACE:TABLENAME>... | -i <INPUT_FILE>...]
Options
-i, --inputFiles <file1> [<file2>...] Specifies one or more files containing namespaces or table names, one per line.
Description
This command compares:
- Regions listed in hbase:meta, and
- Region directories present in HDFS
For each specified namespace or table, it identifies region directories on HDFS that do not have a corresponding entry in hbase:meta. These are reported as missing regions and are grouped by table.
If a table has no missing regions, the command prints a “no missing regions” message.
You may specify:
- One or more table names,
- One or more namespaces, or
- Any combination of both
If no arguments are provided, the command checks all regions across the cluster.
Info
When specifying table names, always include the namespace (for example, default:my_table). Table names without namespaces may be misinterpreted as namespaces.
To repair missing regions by adding them back into hbase:meta, use the addFsRegionsMissingInMeta command.
Examples
- Report missing regions for table_1 and table_2 in the default namespace:
hbase hbck -j <path-to-hbck2-jar> reportMissingRegionsInMeta default:table_1 default:table_2
- Report missing regions for table_1 in the default namespace and for all tables in the namespace ns1:
hbase hbck -j <path-to-hbck2-jar> reportMissingRegionsInMeta default:table_1 ns1
- Report missing regions for tables listed in fileName1 and fileName2:
hbase hbck -j <path-to-hbck2-jar> reportMissingRegionsInMeta -i fileName1 fileName2
