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. Clien

Re: When session expired event fired?

2010-02-08 Thread Mahadev Konar
Hi, a zookeeper client does not expire a session until and unless it is able to connect to one of the servers. In your case if you kill all the servers, the client is not able to connect to any of the servers and will keep trying to connect to the three servers. It cannot expire a session on its o

Re: When session expired event fired?

2010-02-08 Thread neptune
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 (like google bigtables' tabletserver). If no session expired, client check disconnected time. Any idea or usage for cluster me

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, Fe

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 som

Re: When session expired event fired?

2010-02-08 Thread neptune
I saw that wiki page. And I read this paragraph "It means that the client was partitioned off from the ZooKeeper service for more the the session timeout ..." That's why I use Expired event for cluster membership. In my case client is a node in a cluster. 2010/2/9 Patrick Hunt > this? "How shoul

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 ZK_SESSION_TI

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 clust

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, ensurin