public String getClusterId() {
    try {
      ConnectionInfo connInfo = getCurrentConnection();
      return connInfo.connection.getClusterId();
    } catch (IOException e) {
      LOG.error("Error getting connection: ", e);
    }
    return null;
  }
Returns Cluster ID for the HBase cluster or null if there is an err making the connection.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/ConnectionCache.java