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

Switch to Plain View
Zookeeper >> mail # user >> Does Zookeeper Lock Entire Znode Tree During a Write


+
dmly 2012-05-15, 04:15
+
Henry Robinson 2012-05-15, 16:23
+
Narayanan Arunachalam 2012-05-15, 20:09
+
dmly 2012-05-15, 21:56
Copy link to this message
-
Re: Does Zookeeper Lock Entire Znode Tree During a Write
On 5/14/12 9:15 PM, dmly wrote:
> Hi,
> Does ZK lock the entire znode tree during a write? Or does ZK just locks the
> top most znode that a client is connecting to?
> For example:
> When I connect to "/doug" and create the "doug/lock-001" node and do and
> update, is "/" locked or just "/doug"?

ZK actually doesn't have the notion of locks inherently, locking is a
client concept implemented by using ZK atomic operations. So none of the
nodes are actually locked in ZK when you create a node named 'lock-001'.
Any ZK client with appropriate permissions to the node (defined by the
node's ACL) may alter/remove the nodes.

--
Ben Bangert
(ben@ || http://) groovie.org