replication (Hbck2)

Identifies issues related to HBase replication and optionally fixes them.


Command Syntax

hbase hbck -j <path-to-hbck2-jar> replication [OPTIONS] [<TABLENAME>... | -i <INPUT_FILE>...]

Options

Option

Description

-f, --fix

Attempts to correct any replication issues found.

-i, --inputFiles <file1> [<file2>...]

Specifies one or more input files containing table names, one per line.


Description

This command checks for common replication-related issues in the cluster. Its primary functions include:

  • Detecting undeleted replication queues These queues may remain after RegionServer failures or other operational issues. With --fix, the command attempts to delete these stale queues.

  • Checking replication barriers for specified tables If table names are provided—either directly or through an input file—the command inspects replication barriers for those tables. With --fix, it purges outdated or unnecessary barriers.

Cleaning up stale replication metadata helps ensure smooth and consistent replication behavior across the cluster.


Examples

  1. Report replication issues for all tables:

hbase hbck -j <path-to-hbck2-jar> replication
  1. Fix replication issues for myreplicatedtable:

hbase hbck -j <path-to-hbck2-jar> replication --fix myreplicatedtable
  1. Fix replication issues for tables listed in fileName1:

hbase hbck -j <path-to-hbck2-jar> replication --fix -i fileName1


  Last updated