private synchronized InetSocketAddress getMasterAddress() {
if (!mUseZookeeper) {
return mMasterAddress;
}
LeaderInquireClient leaderInquireClient =
LeaderInquireClient.getClient(CommonConf.get().ZOOKEEPER_ADDRESS,
CommonConf.get().ZOOKEEPER_LEADER_PATH);
try {
String temp = leaderInquireClient.getMasterAddress();
return CommonUtils.parseInetSocketAddress(temp);
} catch (IOException e) {
LOG.error(e.getMessage(), e);
throw Throwables.propagate(e);
}