}
}
}
private static String getPeerQuorumAddress(final Configuration conf) throws IOException {
HConnection conn = HConnectionManager.getConnection(conf);
try {
ReplicationZookeeper zk = new ReplicationZookeeper(conn, conf,
conn.getZooKeeperWatcher());
ReplicationPeer peer = zk.getPeer(peerId);
if (peer == null) {
throw new IOException("Couldn't get peer conf!");
}
Configuration peerConf = peer.getConfiguration();
return ZKUtil.getZooKeeperClusterKey(peerConf);
} catch (KeeperException e) {
throw new IOException("Got a ZK exception", e);
} finally {
conn.close();
}
}