default SyncReplicationState getReplicationPeerSyncReplicationState(String peerId)
    throws IOException {
    List<ReplicationPeerDescription> peers = listReplicationPeers(Pattern.compile(peerId));
    if (peers.isEmpty() || !peers.get(0).getPeerId().equals(peerId)) {
      throw new IOException("Replication peer " + peerId + " does not exist");
    }
    return peers.get(0).getSyncReplicationState();
  }
Get the current cluster state in a synchronous replication peer.
@param peerId a short name that identifies the peer
@return the current cluster state
@throws IOException if a remote or network exception occurs
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java