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

Switch to Threaded View
Zookeeper >> mail # user >> Create nested paths


Copy link to this message
-
Re: Create nested paths
http://zookeeper.apache.org/doc/r3.4.2/api/org/apache/zookeeper/ZooKeeper.html#multi(java.lang.Iterable)

The javadoc for Op does not appear for an unknown (to me) reason.  Here it
is from org.apache.zookeeper.Op:

/**
 * Represents a single operation in a multi-operation transaction.  Each
operation can be a create, update
 * or delete or can just be a version check.
 *
 * Sub-classes of Op each represent each detailed type but should not
normally be referenced except via
 * the provided factory methods.
 *
 * @see ZooKeeper#create(String, byte[], java.util.List, CreateMode)
 * @see ZooKeeper#create(String, byte[], java.util.List, CreateMode,
org.apache.zookeeper.AsyncCallback.StringCallback, Object)
 * @see ZooKeeper#delete(String, int)
 * @see ZooKeeper#setData(String, byte[], int)
 */

Sample usage can be found in org.apache.zookeeper.test.MultiTransactionTest

On Wed, Feb 29, 2012 at 4:26 PM, Shelley, Ryan <[EMAIL PROTECTED]>wrote:

> Can you reference some docs? I looked but couldn't find anything regarding
> multi.
>
> On 2/29/12 4:23 PM, "Ted Dunning" <[EMAIL PROTECTED]> wrote:
>
> >Well, in 3.4, you can use multi to do this.
> >
> >On Wed, Feb 29, 2012 at 4:08 PM, Shelley, Ryan
> ><[EMAIL PROTECTED]>wrote:
> >
> >> Is it possible to create all nodes in a path in one step?
> >>
> >> For example, my ZK is empty of any nodes. I want to create:
> >> /lorem/ipsum/foo/bar
> >>
> >> Do I have to create each segment with iterative calls to ZK, or is there
> >> an easier way to build this?
> >>
>
>