hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satish Bhatti <cthd2...@gmail.com>
Subject zookeeper.getChildren asynchronous callback
Date Wed, 10 Jun 2009 19:05:40 GMT
I am using the asynchronous (callback) version of zookeeper.getChildren().
 That call returns immediately, I then wait for a certain time interval for
nodes to appear, and if not I exit the method that made the
zookeeper.getChildren()
call.  Later on, a node gets added under that node and I see in my logfile
that the Watcher.process() callback that I set above gets called.  Now if I
make 10 failed attempts to get a node using the above technique, and at some
later time a node does get added, I see in the logfile that the
Watcher.process() ends up being called 10 times!  Of course by this time I
have totally lost interest in those callbacks.  Question:  Is there a way to
remove that asynchronous callback?  i.e. If I make a asynchronous
zookeeper.getChildren()
call, wait time t, give up, at that point can I remove the async callback?
Satish

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message