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

Switch to Threaded View
Zookeeper >> mail # user >> Data vs. Exists Watches

Copy link to this message
Data vs. Exists Watches
I'm a bit curious about some of the implementation details for exists and data watches. In the Jute files, C client, and Java client, watches are divided into:
- Data watches
- Exists watches
- Children watches

Yet the code treats data and exists watches identically, calling them at the same time. Which makes sense of course given this is in the Zookeeper Programmers manual:
"It helps to think of ZooKeeper as maintaining two lists of watches: data watches and child watches. getData() and exists() set data watches. getChildren() sets child watches."

So why do the implementations treat data and exists watches identically, but store them in two different spots? Why do the Jute files differentiate? Is this to handle some possible future difference between the two?