()
return zk
Start a connection to ZooKeeper
Start a connection to ZooKeeper
Start a connection to ZooKeeper
def raw_client():
    """Start a connection to ZooKeeper"""
    ns = get_NS()
    log.debug(
        "Connecting to ZooKeeper",
        extra=dict(qb_zookeeper_hosts=ns.qb_zookeeper_hosts,
                   qb_zookeeper_timeout=ns.qb_zookeeper_timeout))
    zk = KazooClient(ns.qb_zookeeper_hosts, ns.qb_zookeeper_timeout)
    zk.logger.handlers = log.handlers
    zk.logger.setLevel('WARN')
    zk.start()
    atexit.register(zk.stop)
    return zk
def raw_client ( ) : ns = get_NS ( ) log . debug ( "Connecting to ZooKeeper" , extra = dict ( qb_zookeeper_hosts = ns . qb_zookeeper_hosts , qb_zookeeper_timeout = ns . qb_zookeeper_timeout ) ) zk = KazooClient ( ns . qb_zookeeper_hosts , ns . qb_zookeeper_timeout ) zk . logger . handlers = log . handlers zk . logger . setLevel ( 'WARN' ) zk . start ( ) atexit . register ( zk . stop ) return zk