Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> question about lock recipe and watchers


Copy link to this message
-
RE: question about lock recipe and watchers
Phil, thank you for the experience report!

Maybe the website should be updated with this suggestion...
________________________________________
From: Phil Carns [[EMAIL PROTECTED]]
Sent: 17 September 2012 15:15
To: [EMAIL PROTECTED]
Subject: Re: question about lock recipe and watchers

I tried out Michi's suggestion over the weekend and it seems to be
working great.  I just used a one-byte get() in place of the exists()
call recommended in the recipe.  I'm actually using wget(), to be
precise.  The wget() either returns an error immediately (because the
node has already been deleted) or else returns successfully and queues a
watcher that triggers when the node is deleted later.  There is no need
to set a value in the node.