public ServerName getMasterAddress(final boolean refresh) {
    try {
      return ProtobufUtil.parseServerNameFrom(super.getData(refresh));
    } catch (DeserializationException e) {
      LOG.warn("Failed parse", e);
      return null;
    }
  }
Get the address of the current master if one is available. Returns null if no current master.
If refresh is set, try to load the data from ZK again, otherwise, cached data will be used.
@param refresh whether to refresh the data by calling ZK directly.
@return Server name or null if timed out.
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MasterAddressTracker.java