Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> watchers and multiple notifications


Copy link to this message
-
watchers and multiple notifications
Hi All,

I am trying to understand the behavior of watches and need clarification on
two things:

Documentation says (
http://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#sc_WatchRememberThese
)

"*Be prepared to handle the case where the znode changes multiple times
between getting the event and setting the watch again. (You may not care,
but at least realize it may happen.)*"

1. Does this mean, once I set the watch again I am guaranteed to receive
one notification for all multiple events that I missed in the mean time
immediately? Or do I get a notification only when there is a new event?

2. Let say I got an event, before start handling the event I set the watch
again and got busy in the callback. Meanwhile I have multiple events. Are
these events result into one notification or multiple notifications?

In my system, I don't want to miss a notification at the same time I want
to handle an event just once if there are multiple notifications triggered
on it.

Thanks in Advance!
-gopala
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB