extraRegionsInMeta (Hbck2)

Reports regions that exist in hbase:meta but do not have corresponding region directories on the filesystem. The hbase:meta table must be online for this command to run.

Command Syntax

Bash
Copy

Options

OptionDescription
-f, --fixRemoves all extra regions found in hbase:meta.
-i, --inputFiles <file1> [<file2>...]Specifies one or more files containing namespaces or table names, one per line.

Description

For each specified namespace or table, this command compares the regions recorded in hbase:meta with the region directories present on the filesystem.

A region is reported as extra when:

  • It exists in hbase:meta, and
  • No matching region directory exists on the filesystem.

If you specify the --fix option, all such extra regions will be removed from hbase:meta.

Important Considerations

  • Before running --fix, verify whether the reported extra regions overlap with existing valid regions.

    • If an overlap exists, using extraRegionsInMeta --fix is typically the safest and most effective option.
  • If the extra regions do not overlap, the assigns command may be a simpler alternative because it can recreate missing region directories when needed.

Examples

  1. Report extra regions for table_1 and table_2 in the default namespace:
Bash
Copy
  1. Report extra regions for table_1 in the default namespace and all tables in namespace ns1:
Bash
Copy
  1. Fix (remove) extra regions for tables listed in fileName1 and fileName2:
Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated