replication (Hbck2)

Identifies issues related to HBase replication and optionally fixes them.

Command Syntax

Bash
Copy

Options

OptionDescription
-f, --fixAttempts 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:
Bash
Copy
  1. Fix replication issues for myreplicatedtable:
Bash
Copy
  1. Fix replication issues for tables listed in fileName1:
Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated