public static List<String> listChildrenAndWatchForNewChildren(
            ZooKeeperWatcher zkw, String zNode) throws KeeperException {
        try {
            List<String> children = zkw.getRecoverableZooKeeper().getChildren(zNode,
                    zkw);
            return children;
        } catch (KeeperException.NoNodeException ke) {
            if (logger.isDebugEnabled()) {
                logger.debug(zkw.prefix("Unable to list children of zNode " + zNode + " "
                        + "because node does not exist (not an error)"));
            }
            return null;
        } catch (KeeperException e) {
            logger.warn(zkw.prefix("Unable to list children of zNode " + zNode + " "), e);
            zkw.keeperException(e);
            return null;
        } catch (InterruptedException e) {
            logger.warn(zkw.prefix("Unable to list children of zNode " + zNode + " "), e);
            zkw.interruptedException(e);
            return null;
        }
    }
Lists the children zNodes of the specified zNode. Also sets a watch on the
specified zNode which will capture a NodeDeleted event on the specified
zNode as well as NodeChildrenChanged if any children of the specified zNode
are created or deleted.

Returns null if the specified node does not exist. Otherwise returns a list
of children of the specified node. If the node exists but it has no
children, an empty list will be returned.

@param zkw zk reference
@param zNode
         path of node to list and watch children of
@return list of children of the specified node, an empty list if the node
        exists but has no children, and null if the node does not exist
@throws KeeperException
          if unexpected zookeeper exception
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/zookeeper/ZKUtil.java