public static int createAndWatch(ZooKeeperWatcher zkw, String zkNode, byte[] data)
            throws KeeperException, KeeperException.NodeExistsException {
        try {
            waitForZKConnectionIfAuthenticating(zkw);
            zkw.getRecoverableZooKeeper().create(zkNode, data, createACL(zkw, zkNode),
                    CreateMode.PERSISTENT);
            Stat stat = zkw.getRecoverableZooKeeper().exists(zkNode, zkw);
            if (stat == null) {
                return -1;
            }
            return stat.getVersion();
        } catch (InterruptedException e) {
            zkw.interruptedException(e);
            return -1;
        }
    }
Creates the specified node with the specified data and watches it.
<p/>
<p/>
Throws an exception if the node already exists.
<p/>
<p/>
The node created is persistent and open access.
<p/>
<p/>
Returns the version number of the created node if successful.

@param zkw   zk reference
@param zkNode path of node to create
@param data  data of node to create
@return version of node created
@throws KeeperException                     if unexpected zookeeper exception
@throws KeeperException.NodeExistsException if node already exists
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/zookeeper/ZKUtil.java