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 03:10:07 GMT
Agreed. Please feel free to raise a jira task for improving zkcli#setACL()
javadoc.

Rakesh

On Fri, Jun 23, 2017 at 8:32 AM, Brahma Reddy Battula <
brahmareddy.battula@huawei.com> wrote:

> One suggestion here.
>
> Java doc or argument can be improved which might not mislead..?
>
> i) public Stat setACL(final String path, List<ACL> acl, int aversion or
> aclVersion)
> ii) "should pass aclversion only"..something like this..
>
>
>
> --Brahma Reddy Battula
>
> -----Original Message-----
> From: Rakesh Radhakrishnan [mailto:rakeshr@apache.org]
> Sent: 23 June 2017 10:47
> To: user@zookeeper.apache.org
> Subject: Re: Version parameter passed to ZooKeeper.setACL
>
> 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