How to use the zookeeper.ZOO_LOG_LEVEL_WARN function in zookeeper

To help you get started, we’ve selected a few zookeeper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github geisbruch / varnish-storm-collector / collector / collector.js View on Github external
process.on('SIGINT',function(){
    console.log("Exiting")
    if(zk != undefined && zk != null)
        zk.close();

        zk = new ZooKeeper({
          connect: process.argv[2],
          timeout: 22000,
          debug_level: ZooKeeper.ZOO_LOG_LEVEL_WARN,
          host_order_deterministic: false
        })

    zk.connect(function(err){
        zk.a_get(zkPath,false,function(rc,error,stat,data){
            zk.a_delete_(zkPath, stat.version,function(rc,error){
               zk.close()  
            })
        })
    })
    setTimeout(function(){
        process.exit(0)
    },1000)
   })
}
github geisbruch / varnish-storm-collector / collector / collector.js View on Github external
commandRunner = function(){
    zkPath=process.argv[3]+"/"+os.hostname()
    console.log(zkPath)
    zk = new ZooKeeper({
          connect: process.argv[2],
          timeout: 22000,
          debug_level: ZooKeeper.ZOO_LOG_LEVEL_WARN,
          host_order_deterministic: false
    })
   console.log("Connecting to: "+process.argv[2])
   zk.connect(function(err){
     console.log(os.hostname())
     zk.a_create(zkPath,null,0,function(rc,error,path){
         zk.close()
     })   

   })
   child = spawn("varnishlog",["-u"])
   carrierReader = carrier.carry(child.stdout)
   var errors = 0;
   carrierReader.on('line', function(line){
        readed++;
        for(qs in queues){