zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh Radhakrishnan <rake...@apache.org>
Subject Re: Version parameter passed to ZooKeeper.setACL
Date Fri, 23 Jun 2017 02:46:50 GMT
Hi Arpit,

Stat#aversion represents "the number of changes to the ACL of this znode."
On calling the zkcli#setACL api, internally ZK server will increase the
'aversion' by one. If the given 'aversion' does not match the znode's
aversion it will throw BadVersionException.

While invoking the #setACL api, you should pass "Stat.aversion".

Rakesh

On Thu, Jun 22, 2017 at 11:34 PM, Arpit Agarwal <aagarwal@hortonworks.com>
wrote:

> Greetings,
>
> For the ZooKeeper.setACL call:
>
> https://github.com/apache/zookeeper/blob/master/src/java/
> main/org/apache/zookeeper/ZooKeeper.java#L2368
>
>      public Stat setACL(final String path, List<ACL> acl, int version)
>
> Should version be set to Stat.version or Stat.aversion?
>
> Thanks,
> Arpit
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message