public static boolean setMasterAddress(final ZKWatcher zkw, final String znode,
    final ServerName master, int infoPort) throws KeeperException {
    return ZKUtil.createEphemeralNodeAndWatch(zkw, znode, toByteArray(master, infoPort));
  }
Set master address into the <code>master</code> znode or into the backup subdirectory of backup
masters; switch off the passed in <code>znode</code> path.
@param zkw    The ZKWatcher to use.
@param znode  Where to create the znode; could be at the top level or it could be under backup
              masters
@param master ServerName of the current master must not be null.
@return true if node created, false if not; a watch is set in both cases
@throws KeeperException if a ZooKeeper operation fails
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MasterAddressTracker.java