RE: Version parameter passed to ZooKeeper.setACL

2017-06-22 Thread Brahma Reddy Battula
Done. https://issues.apache.org/jira/browse/ZOOKEEPER-2818

Thanks.

--Brahma Reddy Battula

-Original Message-
From: Rakesh Radhakrishnan [mailto:rake...@apache.org] 
Sent: 23 June 2017 11:10
To: user@zookeeper.apache.org
Subject: Re: Version parameter passed to ZooKeeper.setACL

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.batt...@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, int aversion 
> or
> aclVersion)
> ii) "should pass aclversion only"..something like this..
>
>
>
> --Brahma Reddy Battula
>
> -Original Message-
> From: Rakesh Radhakrishnan [mailto:rake...@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 
> 
> 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, int 
> > version)
> >
> > Should version be set to Stat.version or Stat.aversion?
> >
> > Thanks,
> > Arpit
> >
> >
> >
>


Re: Version parameter passed to ZooKeeper.setACL

2017-06-22 Thread Rakesh Radhakrishnan
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.batt...@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, int aversion or
> aclVersion)
> ii) "should pass aclversion only"..something like this..
>
>
>
> --Brahma Reddy Battula
>
> -Original Message-
> From: Rakesh Radhakrishnan [mailto:rake...@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 
> 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, int version)
> >
> > Should version be set to Stat.version or Stat.aversion?
> >
> > Thanks,
> > Arpit
> >
> >
> >
>


RE: Version parameter passed to ZooKeeper.setACL

2017-06-22 Thread Brahma Reddy Battula
One suggestion here.

Java doc or argument can be improved which might not mislead..?

i) public Stat setACL(final String path, List acl, int aversion or 
aclVersion)
ii) "should pass aclversion only"..something like this..



--Brahma Reddy Battula

-Original Message-
From: Rakesh Radhakrishnan [mailto:rake...@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 
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, int version)
>
> Should version be set to Stat.version or Stat.aversion?
>
> Thanks,
> Arpit
>
>
>


Re: Version parameter passed to ZooKeeper.setACL

2017-06-22 Thread Rakesh Radhakrishnan
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 
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, int version)
>
> Should version be set to Stat.version or Stat.aversion?
>
> Thanks,
> Arpit
>
>
>


Re: Version parameter passed to ZooKeeper.setACL

2017-06-22 Thread Jordan Zimmerman
Stat.aversion

> On Jun 22, 2017, at 1:04 PM, Arpit Agarwal  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, int version)
> 
> Should version be set to Stat.version or Stat.aversion?
> 
> Thanks,
> Arpit
> 
>