Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


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

NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB