Region found in HDFS but missing in Meta

Know how to troubleshoot issues related to the regions that are found in the HDFS cluster however missing in the Meta table.

Condition

Region directory exists in the HDFS cluster but not listed in hbase:meta.

Cause

Meta corruption or missed updates.

As a result, data in the region is not accessible to applications.

Remedy

  1. Run the following commands to troubleshoot the issue.
    hdfs dfs -ls /hbase/data/<namespace>/<table>/<region-id>
    echo "scan 'hbase:meta'" | hbase shell | grep <region-id>
  2. Run the following command to fix the issue.
    hbase hbck -j <hbck2-jar> addFsRegionsMissingInMeta <namespace>:<table>
  3. Restart the HBase Master server.
    hbase hbck -j <hbck2-jar> assigns <region-id>