Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper, mail # user - redundant watches


Copy link to this message
-
redundant watches
Ted Dunning 2012-01-18, 23:50
I just had a question from an engineer regarding watches.  I realized in
answering that I am not 100% sure that my answer is correct and would like
some confirmation.

The scenario is when redundant watches are set on a znode.  The questions
are:

a) is there any adverse impact to redundant watches in which the same
Watcher object is set as watcher for the same operations on the same node.
 (proposed answer: I don't think so.  I think all watches will be triggered
in sequence just like non-redundant watches).

b) is there any way to determine whether a watch is already set or a list
of all watches already set?  (proposed answer:  I don't think so.  There
certainly isn't any obvious way in the API to do this)

c) is there any way to cancel a watch.  (proposed answer: I don't think so.
 There has been recent action on this, but nothing final yet)

d) is there a way to create a watch such that there is exactly one watch
for the session on a particular znode?  (proposed answer: I don't see any
way)

Can somebody confirm or deny these answers?