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 # dev >> recursive delete in multi


Copy link to this message
-
recursive delete in multi
Hi,
Currently multi() only supports single delete Op:

    public void testNestedCreate() throws Exception {

        multi(zk, Arrays.asList(

                /* Create */

                Op.create("/multi", new byte[0], Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT),

                Op.create("/multi/a", new byte[0], Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT),

                Op.create("/multi/a/1", new byte[0], Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT),

                /* Delete */

                Op.delete("/multi/a/1", 0),

                Op.delete("/multi/a", 0),

                Op.delete("/multi", 0)

                ));

To obtain all the paths to be deleted, I need to traverse all the children
of the specified node. Is there plan to support recursive deletion in multi
so that I don't need to perform the traversal first ?
Thanks
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