See 
http://hadoop.apache.org/zookeeper/docs/r3.0.1/recipes.html#sc_recipes_Locks 
for the recommended implementation.

-----Original Message-----
From: "Kevin Burton" <bur...@spinn3r.com>
Sent: Saturday, January 3, 2009 11:13pm
To: zookeeper-user@hadoop.apache.org
Subject: mutexes

I assume the recipe for creating a mutex in ZK would be:
create a nonce
create an ephemeral lock on a named node.
if you succeed on the create you one the lock
if not, add an event to watch for the node being deleted
  attempt to lock.

Kevin

-- 
Founder/CEO Spinn3r.com
Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator
Work: http://spinn3r.com


  • mutexes Kevin Burton
    • RE: mutexes Stu Hood

Reply via email to