unassigns (Hbck2)
Performs a raw unassign of one or more regions. This command bypasses HBase Coprocessors and can be used even during Master initialization when the -skip flag is provided. Use with extreme caution.
Command Syntax
hbase hbck -j <path-to-hbck2-jar> unassigns [OPTIONS] [<ENCODED_REGIONNAME>... | -i <INPUT_FILE>...]
Options
- -o, --override Overrides ownership if the region is currently owned by another procedure.
- -i, --inputFiles <file1> [<file2>...] Specifies one or more files containing encoded region names, one per line.
- -b, --batchSize <number> Specifies the number of regions to process per batch. This is useful when unassigning a large number of regions to avoid CallTimeoutException. Default: -1 (no batching).
Description
Provide one or more encoded region names to unassign those regions from their current RegionServer.
Examples of encoded region names:
- User-space region: de00010733901a05f5a2a3a382e27dd4
- The hbase:meta region (hard-coded): 1588230740
This command schedules unassign operations directly, without validation from Coprocessors or other safety layers. It should be used only in scenarios where standard assignment procedures are blocked or non-functional.
Return Value
- PID(s) of the created UnassignProcedure instances, or
- -1 if no procedures were created
See Also
- org.apache.hbase.hbck1.OfflineMetaRepair (offline meta-repair tool) Refer to the HBCK2 README for usage details.
Examples
- Unassign the hbase:meta region and a specific user region:
hbase hbck -j <path-to-hbck2-jar> unassigns 1588230740 de00010733901a05f5a2a3a382e27dd4
- Unassign regions listed in two files, batching 500 regions at a time:
hbase hbck -j <path-to-hbck2-jar> unassigns -i fileName1 fileName2 -b 500
