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

Switch to Plain View
Zookeeper, mail # dev - recursive delete in multi


+
Ted Yu 2013-03-13, 22:54
Copy link to this message
-
Re: recursive delete in multi
Marshall McMullen 2013-03-14, 03:22
No plans to add that at this point that I know of. Certainly haven't seen
any jira for this.
On Wed, Mar 13, 2013 at 4:54 PM, Ted Yu <[EMAIL PROTECTED]> wrote:

> 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
>
+
Ted Yu 2013-03-14, 03:25
+
Marshall McMullen 2013-03-14, 04:01
+
Ted Yu 2013-03-14, 04:10