You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Kevin Burton <bu...@spinn3r.com> on 2009/01/04 05:13:13 UTC

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

RE: mutexes

Posted by Stu Hood <st...@mailtrust.com>.
See http://hadoop.apache.org/zookeeper/docs/r3.0.1/recipes.html#sc_recipes_Locks for the recommended implementation.

-----Original Message-----
From: "Kevin Burton" <bu...@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