Receiving create events for self with synchronous create

2010-08-26 Thread Todd Nine
Hi all, I'm running into a strange issue I could use a hand with. I've implemented leader election, and this is working well. I'm now implementing a follower queue with ephemeral nodes. I have an interface IClusterManager which simply has the api "clusterChanged". I don't care if nodes are ad

Re: Receiving create events for self with synchronous create

2010-08-26 Thread Mahadev Konar
Hi Todd, The code that you point to, I am not able to make out the sequence of steps. Can you be more clear on what you are trying to do in terms of zookeeper api? Thanks mahadev On 8/26/10 5:58 PM, "Todd Nine" wrote: Hi all, I'm running into a strange issue I could use a hand with. I'v

Re: Receiving create events for self with synchronous create

2010-08-26 Thread Todd Nine
Sure thing. The FollowerWatcher class is instantiated by the IClusterManager implementation.It then performs the following FollowerWatcher.init() which is intended to do the following. 1. Create our follower node so that other nodes know we exist at path "/com/spidertracks/aviator/cluster/fo

Re: Receiving create events for self with synchronous create

2010-08-30 Thread Patrick Hunt
On line 64 are you ensuring that the ZooKeeper session is active before executing that sequence? zookeeper = new ZooKeeper(...) is async - it returns before you're actually connected to the server (you get notified of this in your watcher). If you execute this sequence quickly enough your zk.creat

Re: Receiving create events for self with synchronous create

2010-09-13 Thread Mahadev Konar
Hi Todd, Sorry for my late response. I had marked this email to respond but couldn't find the time :). Did you figure this out? It mostly looks like that as soon as you set a watch on /follower, some other node instantly creates another child of /follower? Could that be the case? Thanks mahad