private void checkQueuesDeleted(String peerId)
    throws ReplicationException, DoNotRetryIOException {
    List<ReplicationQueueId> queueIds = queueStorage.listAllQueueIds(peerId);
    if (!queueIds.isEmpty()) {
      throw new DoNotRetryIOException("There are still " + queueIds.size()
        + " undeleted queue(s) for peerId: " + peerId + ", first is " + queueIds.get(0));
    }
    if (queueStorage.getAllPeersFromHFileRefsQueue().contains(peerId)) {
      throw new DoNotRetryIOException("Undeleted queue for peer " + peerId + " in hfile-refs");
    }
  }
Manages and performs all replication admin operations.
<p>
Used to add/remove a replication peer.
<p>
Implement {@link ConfigurationObserver} mainly for recreating {@link ReplicationPeerStorage}, for
supporting migrating across different replication peer storages without restarting master.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java