def recursive_dump(handle, path, file_handler):
  try:
    children = handle.get_children(path)
    logging.debug("Processing path: {0}".format(path))
    for child in children:
      logging.debug("Processing child: {0}".format(child))
      new_path = '{0}{1}'.format(path, child)
      if path != ZK_TOP_LEVEL:
        new_path = PATH_SEPARATOR.join([path, child])
      recursive_dump(handle, new_path, file_handler)
    if path != ZK_TOP_LEVEL:
      value = handle.get(path)[0].encode('base64')
      file_handler.write("{}\n".format(json.dumps({path: value})))
  except kazoo.exceptions.NoNodeError:
    logging.debug('Reached the end of the zookeeper path.')
Factory function.
dataset/ETHPy150Open AppScale/appscale/AppDB/backup/zookeeper_backup.py/recursive_dump--crossover with--dataset/ETHPy150Open zoofIO/flexx/examples/app/benchmark.py/Float32Array