Reputation: 3748
How to gather number of action in ZooKeeper into one atomic action with one result (pass/fails)?
I read that ZooKeeper supports this with "multiop", but I haven't found it on version 3.4.6. (was MultiCallback name changed?)
Upvotes: 1
Views: 488
Reputation: 2744
You can use zookeeper transactions. Apache Curator library for ZooKeeper provide nice syntax.
For example, to modify several nodes in a transaction:
client.inTransaction().
.setData().forNode(path1, data1)
.and()
.SetData().forNode(path2, data2)
.and()
.commit();
Upvotes: 1