public void checkUnDeletedQueues() throws ReplicationException {
    undeletedQueueIds = getUnDeletedQueues();
    undeletedQueueIds.forEach((replicator, queueIds) -> {
      queueIds.forEach(queueId -> {
        String msg = "Undeleted replication queue for removed peer found: "
          + String.format("[removedPeerId=%s, replicator=%s, queueId=%s]", queueId.getPeerId(),
            replicator, queueId);
        errorReporter.reportError(HbckErrorReporter.ERROR_CODE.UNDELETED_REPLICATION_QUEUE, msg);
      });
    });
    undeletedHFileRefsPeerIds = getUndeletedHFileRefsPeers();
    undeletedHFileRefsPeerIds.stream()
      .map(peerId -> "Undeleted replication hfile-refs queue for removed peer " + peerId + " found")
      .forEach(msg -> errorReporter
        .reportError(HbckErrorReporter.ERROR_CODE.UNDELETED_REPLICATION_QUEUE, msg));
  }
Check and fix undeleted replication queues for removed peerId.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/ReplicationChecker.java