RE: mutexes

2009-01-04 Thread Stu Hood
See http://hadoop.apache.org/zookeeper/docs/r3.0.1/recipes.html#sc_recipes_Locks for the recommended implementation. -Original Message- From: "Kevin Burton" Sent: Saturday, January 3, 2009 11:13pm To: zookeeper-user@hadoop.apache.org Subject: mutexes I assume the recipe for creating a

Not performing work in the zookeeper even thread.

2009-01-04 Thread Kevin Burton
It looks like events from Zookeeper are dispatches from its event thread: java.lang.Exception at foo.zookeeper.WatcherImpl.process(NodeWatcher.java:54) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:349) ... it seems like a good idea to have implementations perf

NoSyncConnected?

2009-01-04 Thread Kevin Burton
What's the difference between SyncConnected and NoSyncConnected? I'm trying to handle zookeeper restart/failure and need to know the best way to handle these. Kevin -- Founder/CEO Spinn3r.com Location: San Francisco, CA AIM/YIM: sfburtonator Skype: burtonator Work: http://spinn3r.com

multiple disconnect events is not a state change.

2009-01-04 Thread Kevin Burton
Shutting down my zookeeper server yields this on my client. Continual disconnect events. Shouldn't only one be issued? The second one is not a state change. WatchedEvent: Server state change. New state: Disconnected WatchedEvent: Server state change. New state: Disconnected WatchedEvent: Server

myid....

2009-01-04 Thread Kevin Burton
This wasn't clear in the documentation. but the admin needs to create the myid file, correct? Couldn't this happen on init if we use IP addresses and we note that it's a new zk server? Kevin -- Founder/CEO Spinn3r.com Location: San Francisco, CA AIM/YIM: sfburtonator Skype: burtonator Work:

Reconnecting to another host on failure but before session expires...

2009-01-04 Thread Kevin Burton
I don't see this documented anywhere. I setup 5 zk servers if I connect to host1 and am performing some action like watching for file updates, and host1 fails, I *should* be able to connect to hosts2-5 just fine. But the ZooKeeper object doesn't do this for me What's the correct behavior

Re: myid....

2009-01-04 Thread Flavio Junqueira
Hi Kevin, The admin doesn't need to create "myid". This is created automaticaly after parsing the configuration file (check QuorumPeerConfig.parse(String[]) if you are interested in the internals). -Flavio On Jan 5, 2009, at 1:10 AM, Kevin Burton wrote: This wasn't clear in the documentat