private static List<String> listChildrenBFSNoWatch(ZKWatcher zkw, final String znode)
    throws KeeperException {
    Deque<String> queue = new ArrayDeque<>();
    List<String> tree = new ArrayList<>();
    queue.add(znode);
    while (true) {
      String node = queue.pollFirst();
      if (node == null) {
        break;
      }
      List<String> children = listChildrenNoWatch(zkw, node);
      if (children == null) {
        continue;
      }
      for (final String child : children) {
        final String childPath = node + "/" + child;
        queue.add(childPath);
        tree.add(childPath);
      }
    }
    return tree;
  }
BFS Traversal of all the children under path, with the entries in the list, in the same order
as that of the traversal. Lists all the children without setting any watches. - zk reference -
path of node
@return list of children znodes under the path if unexpected ZooKeeper exception
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java