[GitHub] zookeeper pull request #122: [ZOOKEEPER-2642] Resurrect the reconfig() metho...

2017-01-17 Thread Randgalt
Github user Randgalt closed the pull request at:

https://github.com/apache/zookeeper/pull/122


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #122: [ZOOKEEPER-2642] Resurrect the reconfig() metho...

2017-01-11 Thread fpj
Github user fpj commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/122#discussion_r95591971
  
--- Diff: src/docs/src/documentation/content/xdocs/zookeeperReconfig.xml ---
@@ -300,6 +300,11 @@ 
server.3=125.23.63.25:2782:2785:participant
   from ZooKeeper class, and use of this API requires ACL setup 
and user
   authentication (see  for more information.).
 
+
+Note: for temporary backward compatibility, the 
reconfig() APIs will remain in ZooKeeper.java
+  where they were for a few alpha versions of 3.5.x. However, 
these APIs are deprecated and users
+  should move to the reconfig() APIs in ZooKeeperAdmin.java.
--- End diff --

Small typo: `reconfig()` should be `reconfigure()`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #122: [ZOOKEEPER-2642] Resurrect the reconfig() metho...

2016-12-15 Thread Randgalt
Github user Randgalt commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/122#discussion_r92597471
  
--- Diff: src/java/main/org/apache/zookeeper/ZooKeeper.java ---
@@ -2910,4 +2923,49 @@ private ClientCnxnSocket getClientCnxnSocket() 
throws IOException {
 throw ioe;
 }
 }
+
+protected byte[] internalReconfig(String joiningServers, String 
leavingServers, String newMembers, long fromConfig, Stat stat) throws 
KeeperException, InterruptedException
+{
--- End diff --

fixed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #122: [ZOOKEEPER-2642] Resurrect the reconfig() metho...

2016-12-15 Thread Randgalt
Github user Randgalt commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/122#discussion_r92597402
  
--- Diff: src/java/main/org/apache/zookeeper/ZooKeeper.java ---
@@ -39,32 +39,10 @@
 import org.apache.zookeeper.client.ZKClientConfig;
 import org.apache.zookeeper.client.ZooKeeperSaslClient;
 import org.apache.zookeeper.common.PathUtils;
+import org.apache.zookeeper.common.StringUtils;
 import org.apache.zookeeper.data.ACL;
 import org.apache.zookeeper.data.Stat;
-import org.apache.zookeeper.proto.CheckWatchesRequest;
-import org.apache.zookeeper.proto.Create2Response;
-import org.apache.zookeeper.proto.CreateRequest;
-import org.apache.zookeeper.proto.CreateResponse;
-import org.apache.zookeeper.proto.CreateTTLRequest;
-import org.apache.zookeeper.proto.DeleteRequest;
-import org.apache.zookeeper.proto.ExistsRequest;
-import org.apache.zookeeper.proto.GetACLRequest;
-import org.apache.zookeeper.proto.GetACLResponse;
-import org.apache.zookeeper.proto.GetChildren2Request;
-import org.apache.zookeeper.proto.GetChildren2Response;
-import org.apache.zookeeper.proto.GetChildrenRequest;
-import org.apache.zookeeper.proto.GetChildrenResponse;
-import org.apache.zookeeper.proto.GetDataRequest;
-import org.apache.zookeeper.proto.GetDataResponse;
-import org.apache.zookeeper.proto.RemoveWatchesRequest;
-import org.apache.zookeeper.proto.ReplyHeader;
-import org.apache.zookeeper.proto.RequestHeader;
-import org.apache.zookeeper.proto.SetACLRequest;
-import org.apache.zookeeper.proto.SetACLResponse;
-import org.apache.zookeeper.proto.SetDataRequest;
-import org.apache.zookeeper.proto.SetDataResponse;
-import org.apache.zookeeper.proto.SyncRequest;
-import org.apache.zookeeper.proto.SyncResponse;
+import org.apache.zookeeper.proto.*;
--- End diff --

fixed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #122: [ZOOKEEPER-2642] Resurrect the reconfig() metho...

2016-12-14 Thread eribeiro
Github user eribeiro commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/122#discussion_r92507667
  
--- Diff: src/java/main/org/apache/zookeeper/ZooKeeper.java ---
@@ -2910,4 +2923,49 @@ private ClientCnxnSocket getClientCnxnSocket() 
throws IOException {
 throw ioe;
 }
 }
+
+protected byte[] internalReconfig(String joiningServers, String 
leavingServers, String newMembers, long fromConfig, Stat stat) throws 
KeeperException, InterruptedException
+{
--- End diff --

nit: inconsistent brace style for method names from line onwards.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #122: [ZOOKEEPER-2642] Resurrect the reconfig() metho...

2016-12-13 Thread eribeiro
Github user eribeiro commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/122#discussion_r92209798
  
--- Diff: src/java/main/org/apache/zookeeper/ZooKeeper.java ---
@@ -39,32 +39,10 @@
 import org.apache.zookeeper.client.ZKClientConfig;
 import org.apache.zookeeper.client.ZooKeeperSaslClient;
 import org.apache.zookeeper.common.PathUtils;
+import org.apache.zookeeper.common.StringUtils;
 import org.apache.zookeeper.data.ACL;
 import org.apache.zookeeper.data.Stat;
-import org.apache.zookeeper.proto.CheckWatchesRequest;
-import org.apache.zookeeper.proto.Create2Response;
-import org.apache.zookeeper.proto.CreateRequest;
-import org.apache.zookeeper.proto.CreateResponse;
-import org.apache.zookeeper.proto.CreateTTLRequest;
-import org.apache.zookeeper.proto.DeleteRequest;
-import org.apache.zookeeper.proto.ExistsRequest;
-import org.apache.zookeeper.proto.GetACLRequest;
-import org.apache.zookeeper.proto.GetACLResponse;
-import org.apache.zookeeper.proto.GetChildren2Request;
-import org.apache.zookeeper.proto.GetChildren2Response;
-import org.apache.zookeeper.proto.GetChildrenRequest;
-import org.apache.zookeeper.proto.GetChildrenResponse;
-import org.apache.zookeeper.proto.GetDataRequest;
-import org.apache.zookeeper.proto.GetDataResponse;
-import org.apache.zookeeper.proto.RemoveWatchesRequest;
-import org.apache.zookeeper.proto.ReplyHeader;
-import org.apache.zookeeper.proto.RequestHeader;
-import org.apache.zookeeper.proto.SetACLRequest;
-import org.apache.zookeeper.proto.SetACLResponse;
-import org.apache.zookeeper.proto.SetDataRequest;
-import org.apache.zookeeper.proto.SetDataResponse;
-import org.apache.zookeeper.proto.SyncRequest;
-import org.apache.zookeeper.proto.SyncResponse;
+import org.apache.zookeeper.proto.*;
--- End diff --

If I remember well, Patrick Hunt once told me during a code review that we 
should use explicit imports instead of wildcards. Right, @phunt ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #122: [ZOOKEEPER-2642] Resurrect the reconfig() metho...

2016-12-10 Thread Randgalt
GitHub user Randgalt opened a pull request:

https://github.com/apache/zookeeper/pull/122

[ZOOKEEPER-2642] Resurrect the reconfig() methods that were in 
ZooKeeper.java.

Resurrect the reconfig() methods that were in ZooKeeper.java. While 3.5.x 
is an alpha there are clients in production that are relying on the current 
specification. The reconfig() methods are marked deprecated to inform that they 
will be removed later. The "new" methods in the new class ZooKeeperAdmin were 
renamed reconfigure() to avoid getting the deprecation annotation inherited and 
to provide clarity. Both reconfig() and reconfigure() are implemented via 
protected methods in ZooKeeper.java

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Randgalt/zookeeper ZOOKEEPER-2642

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zookeeper/pull/122.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #122


commit 3611d18eb73bac5760293730087d2b0c3241b2bc
Author: randgalt 
Date:   2016-12-10T19:33:58Z

Resurrect the reconfig() methods that were in ZooKeeper.java. While 3.5.x 
is an alpha there are clients in production that are relying
on the current specification. The reconfig() methods are marked deprecated 
to inform that they will be removed later. The "new" methods
in the new class ZooKeeperAdmin were renamed reconfigure() to avoid getting 
the deprecation annotation inherited and to provide clarity.
Both reconfig() and reconfigure() are implemented via protected methods in 
ZooKeeper.java




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---