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 Plain View
Zookeeper >> mail # user >> when the zookeeper Expired ,may I have to rebuild the watch on a znode?


+
iamct 2012-06-04, 02:41
+
Wangpei 2012-06-04, 04:01
+
iamct 2012-06-04, 06:37
+
iamct 2012-06-04, 06:36
+
Wangpei 2012-06-04, 10:44
+
iamct 2012-06-04, 14:45
+
李赫元 2012-06-04, 15:47
+
Patrick Hunt 2012-06-04, 22:24
+
iamct 2012-06-05, 08:25
+
Michi Mutsuzaki 2012-06-05, 17:44
+
iamct 2012-06-06, 02:56
Copy link to this message
-
Re: when the zookeeper Expired ,may I have to rebuild the watch on a znode?
Watches are not considered triggered when the watch handlers get
called with EventType.None, They are merely being notified that the
client got disconnected from ZooKeeper and they won't receive any
watch events until the session gets re-established. When the client
gets reconnected to ZooKeeper, it might find out that the session has
been expired. In that case, all the watches associated with that
sessions are lost.

This page explains why ZooKeeper notifies watches about session events.

http://zookeeper.apache.org/doc/r3.2.2/zookeeperProgrammers.html#ch_zkWatches

{quote}
When you disconnect from a server (for example, when the server
fails), you will not get any watches until the connection is
reestablished. For this reason session events are sent to all
outstanding watch handlers. Use session events to go into a safe mode:
you will not be receiving events while disconnected, so your process
should act conservatively in that mode.
{quote}

--Michi

On Tue, Jun 5, 2012 at 7:56 PM, iamct <[EMAIL PROTECTED]> wrote:
> Thank you!
> but i thank it/s not my answer。
>  My questiong is:using java api,I set a watch
> ( methed:getData(final String path, Watcher watcher, Stat stat) )
>
> I know  the watch can be triggered when NodeDataChanged and NodeDeleted (the
> api tell me only the two EventType )。
>
> but I found the watch was triggered by EventType.NOne when i try testing to
> expired a session。
>
> (https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ
> Is there an easy way to expire a session for testing?)
>
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/when-the-zookeeper-Expired-may-I-have-to-rebuild-the-watch-on-a-znode-tp7577513p7577535.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.
+
Wangpei 2012-06-05, 01:55
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