When session expired event fired?

2010-02-08 Thread neptune
Hi all. I have a question. I started zookeeper(3.2.2) on three servers. When session expired event fired in following code? I expected that if client can't connect to server(disconnected) for session timeout, zookeeper fires session expired event. I killed three zookeeper server sequentially.

Re: When session expired event fired?

2010-02-08 Thread Patrick Hunt
Here's one that I know of that's open - LinkedIn's Norbert http://wiki.github.com/rhavyn/norbert/ Patrick neptune wrote: Thanks for your quick answer. I will make cluster member ship service using zookeeper. If a node in a cluster can't connect to zookeeper cluster, the node killed by oneself

RE: When session expired event fired?

2010-02-08 Thread Benjamin Reed
i was looking through the docs to see if we talk about handling session expired, but i couldn't find anything. we should probably open a jira to add to the docs, unless i missed something. did i? ben -Original Message- From: Mahadev Konar [mailto:maha...@yahoo-inc.com] Sent: Monday,

Re: When session expired event fired?

2010-02-08 Thread Patrick Hunt
this? How should I handle SESSION_EXPIRED? http://wiki.apache.org/hadoop/ZooKeeper/FAQ#A3 Benjamin Reed wrote: i was looking through the docs to see if we talk about handling session expired, but i couldn't find anything. we should probably open a jira to add to the docs, unless i missed

Re: When session expired event fired?

2010-02-08 Thread neptune
Hi all, Here's DisconnectedTimeoutHandler sample code. I thought Session Expired is similar DisconnectedTimeoutHandler. *public class WatcherTest implements Watcher { private static final String ZK_HOSTS = 127.0.0.1:2181,127.0.0.1:2182, 127.0.0.1:2183; private static final int

Re: When session expired event fired?

2010-02-08 Thread Patrick Hunt
In this case all of the _other_ zookeeper clients will see the client session is closed (actually they see any ephemeral znodes that the client created are removed, which is typically what you do for group membership - create an ephemeral znode that represents your client, a member of the

Re: When session expired event fired?

2010-02-08 Thread Patrick Hunt
No, disconnected means that you don't have a connection to the cluster, it does not inform the status of the session. The expired indicates that the session itself is no longer valid (and therefore any ephemerals are cleaned up). Perhaps this is one area we should work on wrt the docs,