You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ha...@apache.org on 2017/07/04 05:56:13 UTC

zookeeper git commit: ZOOKEEPER-2818: Improve the ZooKeeper#setACL java doc

Repository: zookeeper
Updated Branches:
  refs/heads/master 697101810 -> 7db83eb9d


ZOOKEEPER-2818: Improve the ZooKeeper#setACL java doc

Author: b00902108 <br...@huawei.com>

Reviewers: Michael Han <ha...@apache.org>

Closes #291 from brahmareddybattula/ZOOKEEPER-2818


Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/7db83eb9
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/7db83eb9
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/7db83eb9

Branch: refs/heads/master
Commit: 7db83eb9dcbd26b79f852e93520db821dabff047
Parents: 6971018
Author: b00902108 <br...@huawei.com>
Authored: Mon Jul 3 22:56:09 2017 -0700
Committer: Michael Han <ha...@apache.org>
Committed: Mon Jul 3 22:56:09 2017 -0700

----------------------------------------------------------------------
 .../org/apache/zookeeper/retry/ZooKeeperRetry.java    |  4 ++--
 src/java/main/org/apache/zookeeper/ZooKeeper.java     | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zookeeper/blob/7db83eb9/src/contrib/zooinspector/src/java/org/apache/zookeeper/retry/ZooKeeperRetry.java
----------------------------------------------------------------------
diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/retry/ZooKeeperRetry.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/retry/ZooKeeperRetry.java
index feb4301..ce959a1 100644
--- a/src/contrib/zooinspector/src/java/org/apache/zookeeper/retry/ZooKeeperRetry.java
+++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/retry/ZooKeeperRetry.java
@@ -217,12 +217,12 @@ public class ZooKeeperRetry extends ZooKeeper {
     }
 
     @Override
-    public Stat setACL(String path, List<ACL> acl, int version)
+    public Stat setACL(String path, List<ACL> acl, int aclVersion)
             throws KeeperException, InterruptedException {
         int count = 0;
         do {
             try {
-                return super.setACL(path, acl, version);
+                return super.setACL(path, acl, aclVersion);
             } catch (KeeperException.ConnectionLossException e) {
                 LoggerFactory.getLogger().warn(
                         "ZooKeeper connection lost.  Trying to reconnect.");

http://git-wip-us.apache.org/repos/asf/zookeeper/blob/7db83eb9/src/java/main/org/apache/zookeeper/ZooKeeper.java
----------------------------------------------------------------------
diff --git a/src/java/main/org/apache/zookeeper/ZooKeeper.java b/src/java/main/org/apache/zookeeper/ZooKeeper.java
index 38eb032..7aeff9e 100644
--- a/src/java/main/org/apache/zookeeper/ZooKeeper.java
+++ b/src/java/main/org/apache/zookeeper/ZooKeeper.java
@@ -2347,25 +2347,25 @@ public class ZooKeeper implements AutoCloseable {
 
     /**
      * Set the ACL for the node of the given path if such a node exists and the
-     * given version matches the version of the node. Return the stat of the
+     * given aclVersion matches the acl version of the node. Return the stat of the
      * node.
      * <p>
      * A KeeperException with error code KeeperException.NoNode will be thrown
      * if no node with the given path exists.
      * <p>
      * A KeeperException with error code KeeperException.BadVersion will be
-     * thrown if the given version does not match the node's version.
+     * thrown if the given aclVersion does not match the node's aclVersion.
      *
-     * @param path
-     * @param acl
-     * @param version
+     * @param path the given path for the node
+     * @param acl the given acl for the node
+     * @param aclVersion the given acl version of the node
      * @return the stat of the node.
      * @throws InterruptedException If the server transaction is interrupted.
      * @throws KeeperException If the server signals an error with a non-zero error code.
      * @throws org.apache.zookeeper.KeeperException.InvalidACLException If the acl is invalide.
      * @throws IllegalArgumentException if an invalid path is specified
      */
-    public Stat setACL(final String path, List<ACL> acl, int version)
+    public Stat setACL(final String path, List<ACL> acl, int aclVersion)
         throws KeeperException, InterruptedException
     {
         final String clientPath = path;
@@ -2381,7 +2381,7 @@ public class ZooKeeper implements AutoCloseable {
             throw new KeeperException.InvalidACLException(clientPath);
         }
         request.setAcl(acl);
-        request.setVersion(version);
+        request.setVersion(aclVersion);
         SetACLResponse response = new SetACLResponse();
         ReplyHeader r = cnxn.submitRequest(h, request, response, null);
         if (r.getErr() != 0) {