public static String readClusterIdZNode(ZKWatcher watcher) throws KeeperException {
    if (ZKUtil.checkExists(watcher, watcher.getZNodePaths().clusterIdZNode) != -1) {
      byte[] data;
      try {
        data = ZKUtil.getData(watcher, watcher.getZNodePaths().clusterIdZNode);
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        return null;
      }
      if (data != null) {
        try {
          return ClusterId.parseFrom(data).toString();
        } catch (DeserializationException e) {
          throw ZKUtil.convert(e);
        }
      }
    }
    return null;
  }
Publishes and synchronizes a unique identifier specific to a given HBase cluster. The stored
identifier is read from the file system by the active master on startup, and is subsequently
available to all watchers (including clients).
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKClusterId.java