public static void createSetData(final ZKWatcher zkw, final String znode, final byte[] data)
    throws KeeperException {
    if (checkExists(zkw, znode) == -1) {
      ZKUtil.createWithParents(zkw, znode, data);
    } else {
      ZKUtil.setData(zkw, znode, data);
    }
  }
Set data into node creating node if it doesn't yet exist. Does not set watch.
@param zkw   zk reference
@param znode path of node
@param data  data to set for node
@throws KeeperException if a ZooKeeper operation fails
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java