[GitHub] [zookeeper] GavinAlison commented on issue #966: Branch 3.5.5 running zookeeper can't start on linux_64 system

2019-06-04 Thread GitBox
GavinAlison commented on issue #966: Branch 3.5.5running zookeeper can't 
start on linux_64 system
URL: https://github.com/apache/zookeeper/pull/966#issuecomment-498602892
 
 
   @maoling , 谢了, 没仔细看readme , 据说要编译 才可以启动


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] maoling commented on issue #833: ZOOKEEPER-3288:add a new doc:ZookeeperCLI.md

2019-06-02 Thread GitBox
maoling commented on issue #833: ZOOKEEPER-3288:add a new doc:ZookeeperCLI.md
URL: https://github.com/apache/zookeeper/pull/833#issuecomment-498120397
 
 
   ping @anmolnar  @eolivelli @nkalmar 
   Could you plz take a look?
   The preview is 
[here](https://github.com/maoling/zookeeper/blob/ZOOKEEPER-3288/zookeeper-docs/src/main/resources/markdown/zookeeperCLI.md)


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #918: ZOOKEEPER-3366: Pluggable metrics system for ZooKeeper - move remaining metrics to MetricsProvider

2019-06-02 Thread GitBox
eolivelli commented on issue #918: ZOOKEEPER-3366: Pluggable metrics system for 
ZooKeeper - move remaining metrics to MetricsProvider
URL: https://github.com/apache/zookeeper/pull/918#issuecomment-498065598
 
 
   Thank you @nkalmar !
   
   It would be great to have your final approval @lvfangmin :-) 
   I will commit tomorrow.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli removed a comment on issue #965: MN-19012 Compile Java code with -Xdoclint

2019-06-02 Thread GitBox
eolivelli removed a comment on issue #965: MN-19012 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-497759739
 
 
   This is still a draft


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli opened a new pull request #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-02 Thread GitBox
eolivelli opened a new pull request #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965
 
 
   Add -Xdoclint option and clean up Javadocs


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-02 Thread GitBox
eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498068024
 
 
   I am investigating about this impossible error:
   ```
   [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) 
on project zookeeper: Compilation failure
   [ERROR] 
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build-maven/zookeeper-server/src/main/java/org/apache/zookeeper/server/SyncRequestProcessor.java:[126,57]
 bad use of '>'
   [ERROR] -> [Help 1]
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] kabike commented on issue #931: ZOOKEEPER-3373:need change description for "Single System Image" guarantee in document

2019-06-02 Thread GitBox
kabike commented on issue #931: ZOOKEEPER-3373:need change description for 
"Single System Image" guarantee in document
URL: https://github.com/apache/zookeeper/pull/931#issuecomment-498082733
 
 
   @hanm "A client will see the same view of the service regardless of the 
server that it connects to" sounds like "A client will see the same view of the 
service regardless of the server that it connects to at the first time", IMO


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on a change in pull request #833: ZOOKEEPER-3288:add a new doc:ZookeeperCLI.md

2019-06-03 Thread GitBox
eolivelli commented on a change in pull request #833: ZOOKEEPER-3288:add a new 
doc:ZookeeperCLI.md
URL: https://github.com/apache/zookeeper/pull/833#discussion_r289702767
 
 

 ##
 File path: zookeeper-docs/src/main/resources/markdown/zookeeperCLI.md
 ##
 @@ -0,0 +1,542 @@
+
+
+# ZooKeeper-cli: the ZooKeeper command line interface
+
+## Pre-requisites
+Enter into the ZooKeeper-cli
+
+```bash
+# connect to the localhost with the default port:2181
+bin/zkCli.sh
+# connect to the remote host with timeout:3s
+bin/zkCli.sh -timeout 3000 -server remoteIP:2181
+```
+## help
+Showing helps about ZooKeeper commands
+
+```bash
+[zkshell: 1] help
+# a sample one
+[zkshell: 2] h
+ZooKeeper -server host:port cmd args
+   addauth scheme auth
+   close
+   config [-c] [-w] [-s]
+   connect host:port
+   create [-s] [-e] [-c] [-t ttl] path [data] [acl]
+   delete [-v version] path
+   deleteall path
+   delquota [-n|-b] path
+   get [-s] [-w] path
+   getAcl [-s] path
+   getAllChildrenNumber path
+   getEphemerals path
+   history
+   listquota path
+   ls [-s] [-w] [-R] path
+   ls2 path [watch]
+   printwatches on|off
+   quit
+   reconfig [-s] [-v version] [[-file path] | [-members 
serverID=host:port1:port2;port3[,...]*]] | [-add 
serverId=host:port1:port2;port3[,...]]* [-remove serverId[,...]*]
+   redo cmdno
+   removewatches path [-c|-d|-a] [-l]
+   rmr path
+   set [-s] [-v version] path data
+   setAcl [-s] [-v version] [-R] path acl
+   setquota -n|-b val path
+   stat [-w] path
+   sync path
+```
+
+## addauth
+Add a authorized user for ACL
+
+```bash
+[zkshell: 9] getAcl /acl_digest_test
+Authentication is not valid : /acl_digest_test
+[zkshell: 10] addauth digest user1:12345
+[zkshell: 11] getAcl /acl_digest_test
+'digest,'user1:+owfoSBn/am19roBPzR1/MfCblE=
+: cdrwa
+# add a super user
+# Notice:set zookeeper.DigestAuthenticationProvider
+# e.g. 
zookeeper.DigestAuthenticationProvider.superDigest=zookeeper:qW/HnTfCSoQpB5G8LgkwT3IbiFc=
+[zkshell: 12] addauth digest zookeeper:admin
+```
+
+## close
+Close this client/session.
+
+```bash
+[zkshell: 0] close
+   2019-03-09 06:42:22,178 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@528] - EventThread shut down for 
session: 0x10007ab7c550006
+   2019-03-09 06:42:22,179 [myid:] - INFO  [main:ZooKeeper@1346] - 
Session: 0x10007ab7c550006 closed
+```
+
+## config
+Showing the config of quorum membership
+
+```bash
+[zkshell: 17] config
+   server.1=[2001:db8:1:0:0:242:ac11:2]:2888:3888:participant
+   server.2=[2001:db8:1:0:0:242:ac11:2]:12888:13888:participant
+   server.3=[2001:db8:1:0:0:242:ac11:2]:22888:23888:participant
+   version=0
+```
+## connect
+Connect a ZooKeeper server.
+
+```bash
+[zkshell: 4] connect
+   2019-03-09 06:43:33,179 [myid:localhost:2181] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@986] - Socket connection 
established, initiating session, client: /127.0.0.1:35144, server: 
localhost/127.0.0.1:2181
+   2019-03-09 06:43:33,189 [myid:localhost:2181] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@1421] - Session 
establishment complete on server localhost/127.0.0.1:2181, sessionid = 
0x10007ab7c550007, negotiated timeout = 3
+   connect "localhost:2181,localhost:2182,localhost:2183"
+
+# connect a remote server
+[zkshell: 5] connect remoteIP:2181
+```
+## create
+Create a znode.
+
+```bash
+# create a persistent_node
+[zkshell: 7] create /persistent_node
+   Created /persistent_node
+
+# create a ephemeral node
+[zkshell: 8] create -e /ephemeral_node mydata
+   Created /ephemeral_node
+
+# create the persistent-sequential node
+[zkshell: 9] create -s /persistent_sequential_node mydata
+   Created /persistent_sequential_node000176
+
+# create the ephemeral-sequential_node
+[zkshell: 10] create -s -e /ephemeral_sequential_node mydata
+   Created /ephemeral_sequential_node000174
+
+# create a node with the schema
+[zkshell: 11] create /zk-node-create-schema mydata 
digest:user1:+owfoSBn/am19roBPzR1/MfCblE=:crwad
+   Created /zk-node-create-schema
+[zkshell: 12] addauth digest user1:12345
+[zkshell: 13] getAcl /zk-node-create-schema
+   'digest,'user1:+owfoSBn/am19roBPzR1/MfCblE=
+   : cdrwa
+
+# create the container node.When the last child of a container is deleted,the 
container becomes to be deleted
+[zkshell: 14] create -c /container_node mydata
+   Created /container_node
+[zkshell: 15] create -c /container_node/child_1 mydata
+   Created /container_node/child_1
+[zkshell: 16] create -c /container_node/child_2 mydata
+   Created /container_node/child_2
+[zkshell: 17] delete /container_node/child_1
+[zkshell: 18] delete /container_node/child_2
+[zkshell: 19] get /container_node
+   org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = 
NoNode for 

[GitHub] [zookeeper] nkalmar commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
nkalmar commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498188536
 
 
   Why not just remove the > sing and use "smaller" on the line
   "If both flushDelay and maxMaxBatchSize are set (> 0)" ? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498192940
 
 
   I had an old version of "master" locally.
   Thank you very much @nkalmar for your support.
   
   I have pushed the fix.
   Maybe I will have to iterate again if the rebase imported new javadoc errors


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498190929
 
 
   @nkalmar this is weird
   here on github I can see the line, but I can't see that line on my local copy
   
   
https://github.com/apache/zookeeper/blob/d3dbe787f37eb9e17402e4a3d55a441ca43b2160/zookeeper-server/src/main/java/org/apache/zookeeper/server/SyncRequestProcessor.java#L126


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498191055
 
 
   ```
   /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
   
   package org.apache.zookeeper.server;
   
   import java.io.Flushable;
   import java.io.IOException;
   import java.util.ArrayDeque;
   import java.util.Objects;
   import java.util.Queue;
   import java.util.concurrent.BlockingQueue;
   import java.util.concurrent.LinkedBlockingQueue;
   import java.util.concurrent.Semaphore;
   import java.util.concurrent.ThreadLocalRandom;
   
   import org.slf4j.Logger;
   import org.slf4j.LoggerFactory;
   
   /**
* This RequestProcessor logs requests to disk. It batches the requests to do
* the io efficiently. The request is not passed to the next RequestProcessor
* until its log has been synced to disk.
*
* SyncRequestProcessor is used in 3 different cases
* 1. Leader - Sync request to disk and forward it to AckRequestProcessor 
which
* send ack back to itself.
* 2. Follower - Sync request to disk and forward request to
* SendAckRequestProcessor which send the packets to leader.
* SendAckRequestProcessor is flushable which allow us to force
* push packets to leader.
* 3. Observer - Sync committed request to disk (received as INFORM packet).
* It never send ack back to the leader, so the nextProcessor 
will
* be null. This change the semantic of txnlog on the observer
* since it only contains committed txns.
*/
   public class SyncRequestProcessor extends ZooKeeperCriticalThread implements
   RequestProcessor {
   
   private static final Logger LOG = 
LoggerFactory.getLogger(SyncRequestProcessor.class);
   
   private static final int FLUSH_SIZE = 1000;
   
   private static final Request REQUEST_OF_DEATH = Request.requestOfDeath;
   
   /** The number of log entries to log before starting a snapshot */
   private static int snapCount = ZooKeeperServer.getSnapCount();
   
   /**
* The total size of log entries before starting a snapshot
*/
   private static long snapSizeInBytes = 
ZooKeeperServer.getSnapSizeInBytes();
   
   /**
* Random numbers used to vary snapshot timing
*/
   private int randRoll;
   private long randSize;
   
   private final BlockingQueue queuedRequests =
   new LinkedBlockingQueue();
   
   private final Semaphore snapThreadMutex = new Semaphore(1);
   
   private final ZooKeeperServer zks;
   
   private final RequestProcessor nextProcessor;
   
   /**
* Transactions that have been written and are waiting to be flushed to
* disk. Basically this is the list of SyncItems whose callbacks will be
* invoked after flush returns successfully.
*/
   private final Queue toFlush = new ArrayDeque<>(FLUSH_SIZE);
   
   public SyncRequestProcessor(ZooKeeperServer zks,
   RequestProcessor nextProcessor) {
   super("SyncThread:" + zks.getServerId(), zks
   .getZooKeeperServerListener());
   this.zks = zks;
   this.nextProcessor = nextProcessor;
   }
   
   /**
* used by tests to check for changing
* snapcounts
* @param count
*/
   public static void setSnapCount(int count) {
   snapCount = count;
   }
   
   /**
* used by tests to get the snapcount
* @return the snapcount
*/
   public static int getSnapCount() {
   return snapCount;
   }
   
   /**
* used by tests to check for changing
* snapcounts
* @param size
*/
   public static void setSnapSizeInBytes(long size) {
   snapSizeInBytes = size;
   }
   
   private boolean shouldSnapshot() {
   int logCount = zks.getZKDatabase().getTxnCount();
   long logSize = zks.getZKDatabase().getTxnSize();
   return (logCount > (snapCount / 2 + randRoll)) ||
   

[GitHub] [zookeeper] eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498191594
 
 
   Oh, maybe I have to rebase :-(


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar edited a comment on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
nkalmar edited a comment on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498188536
 
 
   Why not just remove the > sign and use "bigger" on the line
   "If both flushDelay and maxMaxBatchSize are set (> 0)" ? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
nkalmar commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498191954
 
 
   That's strange indeed. I can see it and it causes build failure. I checked 
out master and applied your patch (although it doesn't even touch that class).


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] grgrzybek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)

2019-06-03 Thread GitBox
grgrzybek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export 
all required packages in OSGi (needed for curator)
URL: https://github.com/apache/zookeeper/pull/945#issuecomment-498168041
 
 
   Excuse me for being late to the party.
   
   Let me introduce myself - I'm OSGi dinosaur and I'd be happy to help here.
   
   So `zookeeper-jute` jar contains (generated from 
`zookeeper-jute/src/main/resources/zookeeper.jute`) these packages:
   * org.apache.zookeeper.data
   * org.apache.zookeeper.proto
   * org.apache.zookeeper.server.quorum
   * org.apache.zookeeper.server.persistence
   * org.apache.zookeeper.txn
   
   `org.apache.zookeeper.data` is fine there, but 
`org.apache.zookeeper.server.quorum` and 
`org.apache.zookeeper.server.persistence` are duplicated in `zookeeper` jar, 
thus simple _OSGIfication_ of `zookeeper` + `zookeeper-jute` is not possible 
(can't have single package exported from two OSGi bundles. I mean it's 
possible, but may lead to unpredictable results - you can't tell which package 
your _importing_ bundle will _wire_ to).
   
   I understand that some classes of `org.apache.zookeeper.server.quorum` are 
written and some are generated from `zookeeper.jute` and it's fine in _flat 
classpath_ scenario.
   
   For OSGi, you'd have to do what for example Hibernate or httpclient (before 
silently dropping OSGi support in httpclient 5) is doing - there should be 
zookeeper-osgi.jar which just embeds both zookeeper and zookeeper-jute. This is 
best approach, because there'll be only one Maven artifact with 
`bundle`.
   
   I'll continue checking.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] maoling commented on a change in pull request #833: ZOOKEEPER-3288:add a new doc:ZookeeperCLI.md

2019-06-03 Thread GitBox
maoling commented on a change in pull request #833: ZOOKEEPER-3288:add a new 
doc:ZookeeperCLI.md
URL: https://github.com/apache/zookeeper/pull/833#discussion_r289740854
 
 

 ##
 File path: zookeeper-docs/src/main/resources/markdown/zookeeperCLI.md
 ##
 @@ -0,0 +1,542 @@
+
+
+# ZooKeeper-cli: the ZooKeeper command line interface
+
+## Pre-requisites
+Enter into the ZooKeeper-cli
+
+```bash
+# connect to the localhost with the default port:2181
+bin/zkCli.sh
+# connect to the remote host with timeout:3s
+bin/zkCli.sh -timeout 3000 -server remoteIP:2181
+```
+## help
+Showing helps about ZooKeeper commands
+
+```bash
+[zkshell: 1] help
+# a sample one
+[zkshell: 2] h
+ZooKeeper -server host:port cmd args
+   addauth scheme auth
+   close
+   config [-c] [-w] [-s]
+   connect host:port
+   create [-s] [-e] [-c] [-t ttl] path [data] [acl]
+   delete [-v version] path
+   deleteall path
+   delquota [-n|-b] path
+   get [-s] [-w] path
+   getAcl [-s] path
+   getAllChildrenNumber path
+   getEphemerals path
+   history
+   listquota path
+   ls [-s] [-w] [-R] path
+   ls2 path [watch]
+   printwatches on|off
+   quit
+   reconfig [-s] [-v version] [[-file path] | [-members 
serverID=host:port1:port2;port3[,...]*]] | [-add 
serverId=host:port1:port2;port3[,...]]* [-remove serverId[,...]*]
+   redo cmdno
+   removewatches path [-c|-d|-a] [-l]
+   rmr path
+   set [-s] [-v version] path data
+   setAcl [-s] [-v version] [-R] path acl
+   setquota -n|-b val path
+   stat [-w] path
+   sync path
+```
+
+## addauth
+Add a authorized user for ACL
+
+```bash
+[zkshell: 9] getAcl /acl_digest_test
+Authentication is not valid : /acl_digest_test
+[zkshell: 10] addauth digest user1:12345
+[zkshell: 11] getAcl /acl_digest_test
+'digest,'user1:+owfoSBn/am19roBPzR1/MfCblE=
+: cdrwa
+# add a super user
+# Notice:set zookeeper.DigestAuthenticationProvider
+# e.g. 
zookeeper.DigestAuthenticationProvider.superDigest=zookeeper:qW/HnTfCSoQpB5G8LgkwT3IbiFc=
+[zkshell: 12] addauth digest zookeeper:admin
+```
+
+## close
+Close this client/session.
+
+```bash
+[zkshell: 0] close
+   2019-03-09 06:42:22,178 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@528] - EventThread shut down for 
session: 0x10007ab7c550006
+   2019-03-09 06:42:22,179 [myid:] - INFO  [main:ZooKeeper@1346] - 
Session: 0x10007ab7c550006 closed
+```
+
+## config
+Showing the config of quorum membership
+
+```bash
+[zkshell: 17] config
+   server.1=[2001:db8:1:0:0:242:ac11:2]:2888:3888:participant
+   server.2=[2001:db8:1:0:0:242:ac11:2]:12888:13888:participant
+   server.3=[2001:db8:1:0:0:242:ac11:2]:22888:23888:participant
+   version=0
+```
+## connect
+Connect a ZooKeeper server.
+
+```bash
+[zkshell: 4] connect
+   2019-03-09 06:43:33,179 [myid:localhost:2181] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@986] - Socket connection 
established, initiating session, client: /127.0.0.1:35144, server: 
localhost/127.0.0.1:2181
+   2019-03-09 06:43:33,189 [myid:localhost:2181] - INFO  
[main-SendThread(localhost:2181):ClientCnxn$SendThread@1421] - Session 
establishment complete on server localhost/127.0.0.1:2181, sessionid = 
0x10007ab7c550007, negotiated timeout = 3
+   connect "localhost:2181,localhost:2182,localhost:2183"
+
+# connect a remote server
+[zkshell: 5] connect remoteIP:2181
+```
+## create
+Create a znode.
+
+```bash
+# create a persistent_node
+[zkshell: 7] create /persistent_node
+   Created /persistent_node
+
+# create a ephemeral node
+[zkshell: 8] create -e /ephemeral_node mydata
+   Created /ephemeral_node
+
+# create the persistent-sequential node
+[zkshell: 9] create -s /persistent_sequential_node mydata
+   Created /persistent_sequential_node000176
+
+# create the ephemeral-sequential_node
+[zkshell: 10] create -s -e /ephemeral_sequential_node mydata
+   Created /ephemeral_sequential_node000174
+
+# create a node with the schema
+[zkshell: 11] create /zk-node-create-schema mydata 
digest:user1:+owfoSBn/am19roBPzR1/MfCblE=:crwad
+   Created /zk-node-create-schema
+[zkshell: 12] addauth digest user1:12345
+[zkshell: 13] getAcl /zk-node-create-schema
+   'digest,'user1:+owfoSBn/am19roBPzR1/MfCblE=
+   : cdrwa
+
+# create the container node.When the last child of a container is deleted,the 
container becomes to be deleted
+[zkshell: 14] create -c /container_node mydata
+   Created /container_node
+[zkshell: 15] create -c /container_node/child_1 mydata
+   Created /container_node/child_1
+[zkshell: 16] create -c /container_node/child_2 mydata
+   Created /container_node/child_2
+[zkshell: 17] delete /container_node/child_1
+[zkshell: 18] delete /container_node/child_2
+[zkshell: 19] get /container_node
+   org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = 
NoNode for 

[GitHub] [zookeeper] eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498190223
 
 
   > Why not just remove the > sign and use "bigger" on the line
   > "If both flushDelay and maxMaxBatchSize are set (> 0)" ?
   
   @nkalmar thankyou for helping out
   in which file ? I can't find the line you are referring to with a 
   `grep -r "maxMaxBatchSize"`
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar edited a comment on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
nkalmar edited a comment on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498188536
 
 
   Why not just remove the > sign and use "bigger" on the line
   "If both flushDelay and maxMaxBatchSize are set (> 0)" ? 
   
   Edit - I got the same error locally when building. Fixed it by removing the 
greater sign.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
nkalmar commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498194477
 
 
   Actually, I do have some javadoc warnings left :( 
   
   `[WARNING] Javadoc Warnings
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerCnxn.java:367:
 warning - Tag @see: missing '#': "dumpConnectionInfo(PrintWriter, boolean) for 
brief stats"
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/ZKDatabase.java:489:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FileTxnLog.java:312:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java:509:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/SnapStream.java:222:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/Util.java:257:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/Util.java:267:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java:80:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java:1117:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerMaster.java:74:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java:246:
 warning - @param argument "qv," is not a parameter name.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java:889:
 warning - @param argument "zxid," is not a parameter name.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java:889:
 warning - @param argument "sid," is not a parameter name.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerHandler.java:1048:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java:1767:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/cli/AclParser.java:36:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/cli/CliCommand.java:75:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/cli/CliCommand.java:83:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/cli/CliCommand.java:91:
 warning - @return tag has no arguments.
   [WARNING] 
/Users/norbertkalmar/workspace/upstream/zookeeper2/zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/cli/CliCommand.java:116:
 warning - @return tag has no arguments.`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] enixon commented on issue #944: ZOOKEEPER-3388: Allow client port to support plaintext and encrypted …

2019-06-04 Thread GitBox
enixon commented on issue #944: ZOOKEEPER-3388: Allow client port to support 
plaintext and encrypted …
URL: https://github.com/apache/zookeeper/pull/944#issuecomment-498769384
 
 
   Thanks, @hanm , I've incorporated your suggestions.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
nkalmar commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498239868
 
 
   I'm not sure why the maven build failed the last run? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498282034
 
 
   @nkalmar the error seems not related to this patch
   
   ```
   java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at 
org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testLeaderOutOfView(QuorumPeerMainTest.java:973)
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498282085
 
 
   retest maven build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] asfgit closed pull request #939: ZOOKEEPER-3385: Add admin command to display leader

2019-06-04 Thread GitBox
asfgit closed pull request #939: ZOOKEEPER-3385: Add admin command to display 
leader
URL: https://github.com/apache/zookeeper/pull/939
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] asfgit closed pull request #850: ZOOKEEPER-3309: Add sync processor metrics

2019-06-04 Thread GitBox
asfgit closed pull request #850: ZOOKEEPER-3309: Add sync processor metrics
URL: https://github.com/apache/zookeeper/pull/850
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] enixon commented on issue #967: ZOOKEEPER-3385: fix build break.

2019-06-04 Thread GitBox
enixon commented on issue #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967#issuecomment-498909577
 
 
   lgtm - thanks for addressing


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] enixon commented on issue #967: ZOOKEEPER-3385: fix build break.

2019-06-04 Thread GitBox
enixon commented on issue #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967#issuecomment-498909611
 
 
   retest ant build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] hanm commented on issue #967: ZOOKEEPER-3385: fix build break.

2019-06-04 Thread GitBox
hanm commented on issue #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967#issuecomment-498898016
 
 
   I had no idea how that was not caught by pre commit checks - everything was 
green before I merged the commit. Anyway, this PR should fix the build. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] hanm opened a new pull request #967: ZOOKEEPER-3385: fix build break.

2019-06-04 Thread GitBox
hanm opened a new pull request #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967
 
 
   PR https://github.com/apache/zookeeper/pull/939 that merged in master caused 
build break due to
   two missing imports. Fix the build break by adding the missing imports.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] asfgit closed pull request #944: ZOOKEEPER-3388: Allow client port to support plaintext and encrypted …

2019-06-04 Thread GitBox
asfgit closed pull request #944: ZOOKEEPER-3388: Allow client port to support 
plaintext and encrypted …
URL: https://github.com/apache/zookeeper/pull/944
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #967: ZOOKEEPER-3385: fix build break.

2019-06-05 Thread GitBox
eolivelli commented on issue #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967#issuecomment-498954587
 
 
   this is the change that dropped those lines

https://github.com/apache/zookeeper/commit/6af151a7e44760c33165e58d3b33a4d2760283a4


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #967: ZOOKEEPER-3385: fix build break.

2019-06-05 Thread GitBox
eolivelli commented on issue #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967#issuecomment-498952500
 
 
   retest ant build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #967: ZOOKEEPER-3385: fix build break.

2019-06-05 Thread GitBox
eolivelli commented on issue #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967#issuecomment-498954366
 
 
   @hanm
   In order to be sure that a patch won't break the codebase, ideally, we 
should re run the precommit before merging.
   This sort of problems occur when the precommit run is too old.
   
   It particular those import clauses were dropped by another patch of mine 
because they were not needed any more


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #967: ZOOKEEPER-3385: fix build break.

2019-06-05 Thread GitBox
nkalmar commented on issue #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967#issuecomment-499003572
 
 
   retest ant build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] maoling commented on issue #968: ZKUtil deleteRecursive check LOG Level before calculate the parameter

2019-06-05 Thread GitBox
maoling commented on issue #968: ZKUtil  deleteRecursive check LOG Level before 
calculate the parameter
URL: https://github.com/apache/zookeeper/pull/968#issuecomment-499028792
 
 
   @Geker You're right.
   - But using the formatting anchors is more succinct。 e.g:
   `LOG.debug("Deleting {} subnodes ", tree.size());`
   - Look at our doc about the  
[logging](http://zookeeper.apache.org/doc/r3.5.5/zookeeperInternals.html#sc_logging)
 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on a change in pull request #905: ZOOKEEPER-3359: Batch commits in the CommitProcessor

2019-06-05 Thread GitBox
nkalmar commented on a change in pull request #905:  ZOOKEEPER-3359: Batch 
commits in the CommitProcessor 
URL: https://github.com/apache/zookeeper/pull/905#discussion_r290656383
 
 

 ##
 File path: zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md
 ##
 @@ -1358,6 +1358,19 @@ Both subsystems need to have sufficient amount of 
threads to achieve peak read t
 Number of Commit Processor worker threads. If configured with 0 worker 
threads, the main thread
 will process the request directly. The default value is the number of cpu 
cores.
 
+* *zookeeper.commitProcessor.maxReadBatchSize* :
+(Java system property only: **zookeeper.commitProcessor.maxReadBatchSize**)
+Max number of reads to process from queuedRequests before switching to 
processing commits.
+If the value < 0 (default), we switch whenever we have a local write, and 
pending commits.
+A high read batch size will delay commit processing, causing stale data to 
be served.
+
+* *zookeeper.commitProcessor.maxCommitBatchSize* :
 
 Review comment:
   Same here, some general guide if possible.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] Geker opened a new pull request #968: ZKUtil deleteRecursive check LOG Level before calculate the parameter

2019-06-05 Thread GitBox
Geker opened a new pull request #968: ZKUtil  deleteRecursive check LOG Level 
before calculate the parameter
URL: https://github.com/apache/zookeeper/pull/968
 
 
   LOG.debug("Deleting " + tree); will be calculate tree.toString() even if the 
log level is higher
   than debug.
   this pull request  check debugEnabled before logging,avoid deleteRecursive 
large tree which may cause OOM.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] asfgit closed pull request #967: ZOOKEEPER-3385: fix build break.

2019-06-05 Thread GitBox
asfgit closed pull request #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #967: ZOOKEEPER-3385: fix build break.

2019-06-05 Thread GitBox
nkalmar commented on issue #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967#issuecomment-499013788
 
 
   retest ant build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #967: ZOOKEEPER-3385: fix build break.

2019-06-05 Thread GitBox
nkalmar commented on issue #967: ZOOKEEPER-3385: fix build break.
URL: https://github.com/apache/zookeeper/pull/967#issuecomment-499025060
 
 
   Merged to master, thanks @hanm 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #944: ZOOKEEPER-3388: Allow client port to support plaintext and encrypted …

2019-05-31 Thread GitBox
eolivelli commented on issue #944: ZOOKEEPER-3388: Allow client port to support 
plaintext and encrypted …
URL: https://github.com/apache/zookeeper/pull/944#issuecomment-497588095
 
 
   @anmolnar I think we should keep this implementation as it is production 
ready and it also eases the backport of features from Facebook friends.
   We can create a JIRA in order to investigate the netty native option


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar commented on issue #963: ZOOKEEPER-3406: Update website for new mailing lists

2019-05-30 Thread GitBox
anmolnar commented on issue #963: ZOOKEEPER-3406: Update website for new 
mailing lists
URL: https://github.com/apache/zookeeper/pull/963#issuecomment-497498101
 
 
   @lfrancke @eolivelli 
   PR against website is good, but a committer has to update the asf-site 
branch once the patch is finalized and committed. Please do this according to 
the wiki page and don't open PRs for asf-site. Thanks.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] enixon commented on issue #944: ZOOKEEPER-3388: Allow client port to support plaintext and encrypted …

2019-05-30 Thread GitBox
enixon commented on issue #944: ZOOKEEPER-3388: Allow client port to support 
plaintext and encrypted …
URL: https://github.com/apache/zookeeper/pull/944#issuecomment-497509348
 
 
   @anmolnar that is correct, Netty gives us OptionalSSLHandler which does 
almost exactly what we want. Since Netty does not give us good access to the 
underlying sockets we were not able to reuse UnifiedServerSocket directly and 
it's lucky that we had OptionalSSLHandler already present as an alternative.
   
   @eolivelli this feature has been indispensable for us in our recent security 
work and, given the number of clients and ensembles we dealt with, it's hard to 
see how the process could have worked without it. It's been production tested 
and has stood up to extensive use.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] lfrancke commented on issue #963: ZOOKEEPER-3406: Update website for new mailing lists

2019-05-30 Thread GitBox
lfrancke commented on issue #963: ZOOKEEPER-3406: Update website for new 
mailing lists
URL: https://github.com/apache/zookeeper/pull/963#issuecomment-497502838
 
 
   _Not_ sending a PR is something I'm very good at ;-)
   
   btw. if someone could assign the Jira ticket to me that'd be great
   https://issues.apache.org/jira/browse/ZOOKEEPER-3406


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar commented on issue #964: ZOOKEEPER-3407: Update POM file

2019-05-31 Thread GitBox
anmolnar commented on issue #964: ZOOKEEPER-3407: Update POM file
URL: https://github.com/apache/zookeeper/pull/964#issuecomment-497675085
 
 
   @lfrancke We already have a view of ZooKeeper ant jobs: 
https://builds.apache.org/view/S-Z/view/ZooKeeper/
   
   Your one seems to be a little bit broken though.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar commented on issue #959: ZOOKEEPER-3402: Add multiRead operation

2019-05-31 Thread GitBox
anmolnar commented on issue #959: ZOOKEEPER-3402: Add multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#issuecomment-497676066
 
 
   retest ant build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation

2019-05-31 Thread GitBox
anmolnar commented on a change in pull request #959: ZOOKEEPER-3402: Add 
multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#discussion_r289354799
 
 

 ##
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/MultiTransactionRecord.java
 ##
 @@ -88,40 +113,53 @@ public void deserialize(InputArchive archive, String tag) 
throws IOException {
 archive.startRecord(tag);
 MultiHeader h = new MultiHeader();
 h.deserialize(archive, tag);
-
-while (!h.getDone()) {
-switch (h.getType()) {
-case ZooDefs.OpCode.create:
-case ZooDefs.OpCode.create2:
-case ZooDefs.OpCode.createContainer:
-CreateRequest cr = new CreateRequest();
-cr.deserialize(archive, tag);
-add(Op.create(cr.getPath(), cr.getData(), cr.getAcl(), 
cr.getFlags()));
-break;
-case ZooDefs.OpCode.createTTL:
-CreateTTLRequest crTtl = new CreateTTLRequest();
-crTtl.deserialize(archive, tag);
-add(Op.create(crTtl.getPath(), crTtl.getData(), 
crTtl.getAcl(), crTtl.getFlags(), crTtl.getTtl()));
-break;
-case ZooDefs.OpCode.delete:
-DeleteRequest dr = new DeleteRequest();
-dr.deserialize(archive, tag);
-add(Op.delete(dr.getPath(), dr.getVersion()));
-break;
-case ZooDefs.OpCode.setData:
-SetDataRequest sdr = new SetDataRequest();
-sdr.deserialize(archive, tag);
-add(Op.setData(sdr.getPath(), sdr.getData(), 
sdr.getVersion()));
-break;
-case ZooDefs.OpCode.check:
-CheckVersionRequest cvr = new CheckVersionRequest();
-cvr.deserialize(archive, tag);
-add(Op.check(cvr.getPath(), cvr.getVersion()));
-break;
-default:
-throw new IOException("Invalid type of op");
+try {
+while (!h.getDone()) {
+switch (h.getType()) {
+case ZooDefs.OpCode.create:
+case ZooDefs.OpCode.create2:
+case ZooDefs.OpCode.createContainer:
+CreateRequest cr = new CreateRequest();
+cr.deserialize(archive, tag);
+add(Op.create(cr.getPath(), cr.getData(), cr.getAcl(), 
cr.getFlags()));
+break;
+case ZooDefs.OpCode.createTTL:
+CreateTTLRequest crTtl = new CreateTTLRequest();
+crTtl.deserialize(archive, tag);
+add(Op.create(crTtl.getPath(), crTtl.getData(), 
crTtl.getAcl(), crTtl.getFlags(), crTtl.getTtl()));
+break;
+case ZooDefs.OpCode.delete:
+DeleteRequest dr = new DeleteRequest();
+dr.deserialize(archive, tag);
+add(Op.delete(dr.getPath(), dr.getVersion()));
+break;
+case ZooDefs.OpCode.setData:
+SetDataRequest sdr = new SetDataRequest();
+sdr.deserialize(archive, tag);
+add(Op.setData(sdr.getPath(), sdr.getData(), 
sdr.getVersion()));
+break;
+case ZooDefs.OpCode.check:
+CheckVersionRequest cvr = new CheckVersionRequest();
+cvr.deserialize(archive, tag);
+add(Op.check(cvr.getPath(), cvr.getVersion()));
+break;
+case ZooDefs.OpCode.getChildren:
+GetChildrenRequest gcr = new GetChildrenRequest();
+gcr.deserialize(archive, tag);
+add(Op.getChildren(gcr.getPath()));
+break;
+case ZooDefs.OpCode.getData:
+GetDataRequest gdr = new GetDataRequest();
+gdr.deserialize(archive, tag);
+add(Op.getData(gdr.getPath()));
+break;
+default:
+throw new IOException("Invalid type of op");
+}
+h.deserialize(archive, tag);
 }
-h.deserialize(archive, tag);
+} catch (IllegalArgumentException e) {
+throw new IOException("Mixing different type of ops");
 
 Review comment:
   language: "different kind of ops"


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above 

[GitHub] [zookeeper] anmolnar commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation

2019-05-31 Thread GitBox
anmolnar commented on a change in pull request #959: ZOOKEEPER-3402: Add 
multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#discussion_r289360089
 
 

 ##
 File path: 
zookeeper-server/src/test/java/org/apache/zookeeper/test/MultiTransactionTest.java
 ##
 @@ -787,6 +796,192 @@ public void testTransactionBuilder() throws Exception {
 assertNull(zk.exists("/t2", false));
 }
 
+@Test
+public void testMultiGetChildren() throws Exception {
+List topLevelNodes = new ArrayList();
+Map> childrenNodes = new HashMap>();
+// Creating a database where '/fooX' nodes has 'barXY' named children.
+for (int i = 0; i < 10; i++) {
+String name = "/foo" + i;
+zk.create(name, name.getBytes(), Ids.OPEN_ACL_UNSAFE,
+CreateMode.PERSISTENT);
+topLevelNodes.add(name);
+childrenNodes.put(name, new ArrayList<>());
+for (int j = 0; j < 10; j++) {
+String childname = name + "/bar" + i + j;
+String childname_s = "bar" + i + j;
+zk.create(childname, childname.getBytes(), Ids.OPEN_ACL_UNSAFE,
+CreateMode.EPHEMERAL);
+childrenNodes.get(name).add(childname_s);
+}
+}
+// Create a multi operation, which queries the children of the nodes 
in topLevelNodes.
+List multiChildrenList =
+multi(zk, 
topLevelNodes.stream().map(Op::getChildren).collect(Collectors.toList()));
+for (int i = 0; i < topLevelNodes.size(); i++) {
+String nodeName = topLevelNodes.get(i);
+Assert.assertTrue(multiChildrenList.get(i) instanceof 
OpResult.GetChildrenResult);
+List childrenList = ((OpResult.GetChildrenResult) 
multiChildrenList.get(i)).getChildren();
+// In general, we do not demand an order from the children list 
but to contain every child.
+Assert.assertEquals(new TreeSet(childrenList),
+new TreeSet(childrenNodes.get(nodeName)));
+
+List children = zk.getChildren(nodeName, false);
+Assert.assertEquals(childrenList, children);
+}
+}
+
+@Test
+public void testMultiGetChildrenSameNode() throws Exception {
+List childrenNodes = new ArrayList();
+// Creating a database where '/foo' node has 'barX' named children.
+String topLevelNode = "/foo";
+zk.create(topLevelNode, topLevelNode.getBytes(), Ids.OPEN_ACL_UNSAFE,
+CreateMode.PERSISTENT);
+for (int i = 0; i < 10; i++) {
+String childname = topLevelNode + "/bar" + i;
+String childname_s = "bar" + i;
+zk.create(childname, childname.getBytes(), Ids.OPEN_ACL_UNSAFE,
+CreateMode.EPHEMERAL);
+childrenNodes.add(childname_s);
+}
+
+// Check for getting the children of the same node twice.
+List sameChildrenList = multi(zk, Arrays.asList(
+Op.getChildren(topLevelNode),
+Op.getChildren(topLevelNode)));
+// The response should contain two elements which are the same.
+Assert.assertEquals(sameChildrenList.size(), 2);
+Assert.assertEquals(sameChildrenList.get(0), sameChildrenList.get(1));
+// Check the actual result.
+Assert.assertTrue(sameChildrenList.get(0) instanceof 
OpResult.GetChildrenResult);
+OpResult.GetChildrenResult gcr = (OpResult.GetChildrenResult) 
sameChildrenList.get(0);
+// In general, we do not demand an order from the children list but to 
contain every child.
+Assert.assertEquals(new TreeSet(gcr.getChildren()),
+new TreeSet(childrenNodes));
+}
+
+@Test
+public void testMultiGetChildrenAuthentication() throws KeeperException, 
InterruptedException {
+List writeOnly = Collections.singletonList(new 
ACL(ZooDefs.Perms.WRITE,
+new Id("world", "anyone")));
+zk.create("/foo_auth", null, Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);
+zk.create("/foo_auth/bar", null, Ids.READ_ACL_UNSAFE, 
CreateMode.PERSISTENT);
+zk.create("/foo_no_auth", null, writeOnly, CreateMode.PERSISTENT);
+
+// Check for normal behaviour.
+List multiChildrenList = multi(zk, 
Arrays.asList(Op.getChildren("/foo_auth")));
+Assert.assertEquals(multiChildrenList.size(), 1);
+Assert.assertTrue(multiChildrenList.get(0) instanceof  
OpResult.GetChildrenResult);
+List childrenList = ((OpResult.GetChildrenResult) 
multiChildrenList.get(0)).getChildren();
+Assert.assertEquals(childrenList.size(), 1);
+Assert.assertEquals(childrenList.get(0), "bar");
+
+// Check for authentication violation.
+multiChildrenList = multi(zk, 
Arrays.asList(Op.getChildren("/foo_no_auth")));
+
+Assert.assertEquals(multiChildrenList.size(), 1);
+ 

[GitHub] [zookeeper] anmolnar commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation

2019-05-31 Thread GitBox
anmolnar commented on a change in pull request #959: ZOOKEEPER-3402: Add 
multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#discussion_r289357787
 
 

 ##
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java
 ##
 @@ -574,6 +585,41 @@ public void processRequest(Request request) {
 }
 }
 
+private Record handleReadRequest(int opCode, Record request, ServerCnxn 
cnxn, List authInfo)
 
 Review comment:
   Please split this into 2 separate methods:
   ```java
   private GetChildrenResponse handleGetChildrenRequest(int opCode, Record 
request, ServerCnxn cnxn, List authInfo)
   
   private GetDataResponse handleGetDataRequest(int opCode, Record request, 
ServerCnxn cnxn, List authInfo)
   ```
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar commented on issue #923: ZOOKEEPER-1426: add version command to the zookeeper server

2019-05-31 Thread GitBox
anmolnar commented on issue #923: ZOOKEEPER-1426: add version command to the 
zookeeper server
URL: https://github.com/apache/zookeeper/pull/923#issuecomment-497685167
 
 
   @eolivelli PTAL.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar commented on issue #959: ZOOKEEPER-3402: Add multiRead operation

2019-05-31 Thread GitBox
anmolnar commented on issue #959: ZOOKEEPER-3402: Add multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#issuecomment-497683452
 
 
   @lvfangmin PTAL.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar commented on issue #963: ZOOKEEPER-3406: Update website for new mailing lists

2019-05-31 Thread GitBox
anmolnar commented on issue #963: ZOOKEEPER-3406: Update website for new 
mailing lists
URL: https://github.com/apache/zookeeper/pull/963#issuecomment-497670442
 
 
   We got 2 approvals, I'll commit and update the website soon.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar commented on issue #963: ZOOKEEPER-3406: Update website for new mailing lists

2019-05-31 Thread GitBox
anmolnar commented on issue #963: ZOOKEEPER-3406: Update website for new 
mailing lists
URL: https://github.com/apache/zookeeper/pull/963#issuecomment-497669475
 
 
   @lfrancke I added you to the contributors list. You can assign the Jira to 
yourself.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar closed pull request #963: ZOOKEEPER-3406: Update website for new mailing lists

2019-05-31 Thread GitBox
anmolnar closed pull request #963: ZOOKEEPER-3406: Update website for new 
mailing lists
URL: https://github.com/apache/zookeeper/pull/963
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation

2019-05-31 Thread GitBox
eolivelli commented on a change in pull request #959: ZOOKEEPER-3402: Add 
multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#discussion_r289464258
 
 

 ##
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java
 ##
 @@ -1895,23 +1897,33 @@ private Op withRootPrefix(Op op) {
 
 protected void multiInternal(MultiTransactionRecord request, MultiCallback 
cb, Object ctx) {
 RequestHeader h = new RequestHeader();
-h.setType(ZooDefs.OpCode.multi);
+switch (request.getOpKind()) {
+case TRANSACTION: h.setType(ZooDefs.OpCode.multi); break;
+case READ: h.setType(ZooDefs.OpCode.multiRead); break;
+}
 MultiResponse response = new MultiResponse();
 cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, null, 
null, ctx, null);
 }
 
 protected List multiInternal(MultiTransactionRecord request)
 throws InterruptedException, KeeperException {
 RequestHeader h = new RequestHeader();
-h.setType(ZooDefs.OpCode.multi);
+switch (request.getOpKind()) {
+case TRANSACTION: h.setType(ZooDefs.OpCode.multi); break;
+case READ: h.setType(ZooDefs.OpCode.multiRead); break;
+}
 MultiResponse response = new MultiResponse();
 ReplyHeader r = cnxn.submitRequest(h, request, response, null);
 if (r.getErr() != 0) {
 throw KeeperException.create(KeeperException.Code.get(r.getErr()));
 }
 
 List results = response.getResultList();
-
+// In case of only read operations there is no need to throw an 
exception
+// as the subResults are still possibly valid.
+if(request.getOpKind() == Op.OpKind.READ)
 
 Review comment:
   Nit add brackets


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation

2019-05-31 Thread GitBox
eolivelli commented on a change in pull request #959: ZOOKEEPER-3402: Add 
multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#discussion_r289463802
 
 

 ##
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java
 ##
 @@ -1895,23 +1897,33 @@ private Op withRootPrefix(Op op) {
 
 protected void multiInternal(MultiTransactionRecord request, MultiCallback 
cb, Object ctx) {
 RequestHeader h = new RequestHeader();
-h.setType(ZooDefs.OpCode.multi);
+switch (request.getOpKind()) {
+case TRANSACTION: h.setType(ZooDefs.OpCode.multi); break;
+case READ: h.setType(ZooDefs.OpCode.multiRead); break;
 
 Review comment:
   Nit: add default


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation

2019-05-31 Thread GitBox
eolivelli commented on a change in pull request #959: ZOOKEEPER-3402: Add 
multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#discussion_r289463991
 
 

 ##
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java
 ##
 @@ -1895,23 +1897,33 @@ private Op withRootPrefix(Op op) {
 
 protected void multiInternal(MultiTransactionRecord request, MultiCallback 
cb, Object ctx) {
 RequestHeader h = new RequestHeader();
-h.setType(ZooDefs.OpCode.multi);
+switch (request.getOpKind()) {
+case TRANSACTION: h.setType(ZooDefs.OpCode.multi); break;
+case READ: h.setType(ZooDefs.OpCode.multiRead); break;
+}
 MultiResponse response = new MultiResponse();
 cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, null, 
null, ctx, null);
 }
 
 protected List multiInternal(MultiTransactionRecord request)
 throws InterruptedException, KeeperException {
 RequestHeader h = new RequestHeader();
-h.setType(ZooDefs.OpCode.multi);
+switch (request.getOpKind()) {
+case TRANSACTION: h.setType(ZooDefs.OpCode.multi); break;
+case READ: h.setType(ZooDefs.OpCode.multiRead); break;
 
 Review comment:
   Nit: add default


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli opened a new pull request #965: MN-19012 Compile Java code with -Xdoclint

2019-05-31 Thread GitBox
eolivelli opened a new pull request #965: MN-19012 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965
 
 
   Add -Xdoclint option and clean up Javadocs


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #965: MN-19012 Compile Java code with -Xdoclint

2019-05-31 Thread GitBox
eolivelli commented on issue #965: MN-19012 Compile Java code with -Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-497759739
 
 
   This is still a draft


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] asfgit closed pull request #923: ZOOKEEPER-1426: add version command to the zookeeper server

2019-05-31 Thread GitBox
asfgit closed pull request #923: ZOOKEEPER-1426: add version command to the 
zookeeper server
URL: https://github.com/apache/zookeeper/pull/923
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] enixon opened a new pull request #972: ZOOKEEPER-2418: txnlog diff sync can skip sending some transactions t…

2019-06-06 Thread GitBox
enixon opened a new pull request #972: ZOOKEEPER-2418: txnlog diff sync can 
skip sending some transactions t…
URL: https://github.com/apache/zookeeper/pull/972
 
 
   …o followers


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] BELUGABEHR commented on issue #878: ZOOKEEPER-3339: Improve Debug and Trace Log Statements

2019-06-06 Thread GitBox
BELUGABEHR commented on issue #878: ZOOKEEPER-3339: Improve Debug and Trace Log 
Statements
URL: https://github.com/apache/zookeeper/pull/878#issuecomment-499724386
 
 
   @lvfangmin Just fixed the merge and pushed again.  Thanks!


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] asfgit closed pull request #969: ZOOKEEPER-3416: Remove redundant ServerCnxnFactoryAccessor.

2019-06-07 Thread GitBox
asfgit closed pull request #969: ZOOKEEPER-3416: Remove redundant 
ServerCnxnFactoryAccessor.
URL: https://github.com/apache/zookeeper/pull/969
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #905: ZOOKEEPER-3359: Batch commits in the CommitProcessor

2019-06-07 Thread GitBox
nkalmar commented on issue #905:  ZOOKEEPER-3359: Batch commits in the 
CommitProcessor 
URL: https://github.com/apache/zookeeper/pull/905#issuecomment-499867500
 
 
   retest ant build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] Geker commented on issue #968: ZKUtil deleteRecursive check LOG Level before calculate the parameter

2019-06-05 Thread GitBox
Geker commented on issue #968: ZKUtil  deleteRecursive check LOG Level before 
calculate the parameter
URL: https://github.com/apache/zookeeper/pull/968#issuecomment-499141367
 
 
   @maoling
   according to the logging guidelines,I modify it


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] hanm opened a new pull request #969: ZOOKEEPER-3416: Remove redundant ServerCnxnFactoryAccessor.

2019-06-05 Thread GitBox
hanm opened a new pull request #969: ZOOKEEPER-3416: Remove redundant 
ServerCnxnFactoryAccessor.
URL: https://github.com/apache/zookeeper/pull/969
 
 
   We have two ways to access the private zkServer inside ServerCnxnFactory, 
and there is really no need to keep maintaining both. We could remove 
ServerCnxnFactoryAccessor when we added the public accessor for 
ServerCnxnFactory in ZOOKEEPER-1346, but we did not.
   
   The solution is to consolidate all access of the zkServer through the public 
accessor of ServerCnxnFactory. The end result is cleaner code base and less 
confusion.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on a change in pull request #953: ZOOKEEPER-3398 Learner.connectToLeader() may take too long to time-out

2019-06-07 Thread GitBox
eolivelli commented on a change in pull request #953: ZOOKEEPER-3398 
Learner.connectToLeader() may take too long to time-out 
URL: https://github.com/apache/zookeeper/pull/953#discussion_r291733345
 
 

 ##
 File path: zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md
 ##
 @@ -861,6 +862,11 @@ of servers -- that is, when deploying clusters of servers.
 connect and sync to a leader. Increased this value as needed, if
 the amount of data managed by ZooKeeper is large.
 
+* *connectToLearnerMasterLimit* :
+(No Java system property)
+Amount of time, in ticks (see [tickTime](#id_tickTime)), to allow 
followers to
+connect to the learner master after leader election.
 
 Review comment:
   We must tell about the default value


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #953: ZOOKEEPER-3398 Learner.connectToLeader() may take too long to time-out

2019-06-07 Thread GitBox
eolivelli commented on issue #953: ZOOKEEPER-3398 Learner.connectToLeader() may 
take too long to time-out 
URL: https://github.com/apache/zookeeper/pull/953#issuecomment-500047290
 
 
   @hanm @lvfangmim
   Does this patch look good to you now?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] vladimirivic commented on a change in pull request #953: ZOOKEEPER-3398 Learner.connectToLeader() may take too long to time-out

2019-06-07 Thread GitBox
vladimirivic commented on a change in pull request #953: ZOOKEEPER-3398 
Learner.connectToLeader() may take too long to time-out 
URL: https://github.com/apache/zookeeper/pull/953#discussion_r291758431
 
 

 ##
 File path: zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md
 ##
 @@ -861,6 +862,11 @@ of servers -- that is, when deploying clusters of servers.
 connect and sync to a leader. Increased this value as needed, if
 the amount of data managed by ZooKeeper is large.
 
+* *connectToLearnerMasterLimit* :
+(No Java system property)
+Amount of time, in ticks (see [tickTime](#id_tickTime)), to allow 
followers to
+connect to the learner master after leader election.
 
 Review comment:
   Default value in the example config is 5. Also if the value is not specified 
or it's not greater than 0, then the `initLimit` value will be used instead.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] vladimirivic commented on a change in pull request #953: ZOOKEEPER-3398 Learner.connectToLeader() may take too long to time-out

2019-06-07 Thread GitBox
vladimirivic commented on a change in pull request #953: ZOOKEEPER-3398 
Learner.connectToLeader() may take too long to time-out 
URL: https://github.com/apache/zookeeper/pull/953#discussion_r291758431
 
 

 ##
 File path: zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md
 ##
 @@ -861,6 +862,11 @@ of servers -- that is, when deploying clusters of servers.
 connect and sync to a leader. Increased this value as needed, if
 the amount of data managed by ZooKeeper is large.
 
+* *connectToLearnerMasterLimit* :
+(No Java system property)
+Amount of time, in ticks (see [tickTime](#id_tickTime)), to allow 
followers to
+connect to the learner master after leader election.
 
 Review comment:
   Default value in the example config is 5. Also if the value is not specified 
or it's not greater than 0, then the `initLimit` value will be used instead. 
Will update the docs shortly.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] lvfangmin commented on a change in pull request #712: Maintain the configuration will be used by server stabilizer.It can be overridden based on the server type and the server sys

2019-06-07 Thread GitBox
lvfangmin commented on a change in pull request #712: Maintain the 
configuration will be used by server stabilizer.It can be overridden based on 
the server type and the server system internals.
URL: https://github.com/apache/zookeeper/pull/712#discussion_r291765165
 
 

 ##
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/ZookeeperServerStabilizerConfig.java
 ##
 @@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zookeeper.common;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ZookeeperServerStabilizerConfig {
 
 Review comment:
   Can you add some simple description for this class.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] maoling opened a new pull request #974: ZOOKEEPER-3344:write a new script:zkSnapShotToolkit.sh to encapsulate SnapshotFormatter and doc the usage

2019-06-07 Thread GitBox
maoling opened a new pull request #974: ZOOKEEPER-3344:write a new 
script:zkSnapShotToolkit.sh to encapsulate SnapshotFormatter and doc the usage
URL: https://github.com/apache/zookeeper/pull/974
 
 
   - A test case about `zkSnapShotToolkit.cmd` in the `Windows` os was included 
in the [JIRA](https://issues.apache.org/jira/browse/ZOOKEEPER-3344)
   - more details in 
[ZOOKEEPER-3344](https://issues.apache.org/jira/browse/ZOOKEEPER-3344)  


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] hanm commented on issue #971: ZOOKEEPER-3418: Improve quorum throughput through eager ACL checks of requests on local servers.

2019-06-06 Thread GitBox
hanm commented on issue #971: ZOOKEEPER-3418: Improve quorum throughput through 
eager ACL checks of requests on local servers.
URL: https://github.com/apache/zookeeper/pull/971#issuecomment-499687356
 
 
   retest maven build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #912: ZOOKEEPER-3365: Use Concurrent HashMap with Counter in NettyServerCnxnFactory

2019-05-30 Thread GitBox
nkalmar commented on issue #912: ZOOKEEPER-3365: Use Concurrent HashMap with 
Counter in NettyServerCnxnFactory
URL: https://github.com/apache/zookeeper/pull/912#issuecomment-497335051
 
 
   retest maven build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #960: Fix typos and grammar in zookeeper docs

2019-05-30 Thread GitBox
nkalmar commented on issue #960: Fix typos and grammar in zookeeper docs
URL: https://github.com/apache/zookeeper/pull/960#issuecomment-497338858
 
 
   retest ant build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #962: ZOOKEEPER-3405: Upgrade the version of Jackson-databind to address OWASP CVE

2019-05-30 Thread GitBox
nkalmar commented on issue #962: ZOOKEEPER-3405: Upgrade the version of 
Jackson-databind to address OWASP CVE
URL: https://github.com/apache/zookeeper/pull/962#issuecomment-497338561
 
 
   Thanks Patrick, committed to 3.5 and master. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] nkalmar commented on issue #946: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (for Curator)

2019-05-30 Thread GitBox
nkalmar commented on issue #946: [ZOOKEEPER-3389] Zookeeper does not export all 
required packages in OSGi (for Curator)
URL: https://github.com/apache/zookeeper/pull/946#issuecomment-497361500
 
 
   Can you backport the maven part from master @JiriOndrusek ? I think it 
should work the same here.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] JiriOndrusek commented on issue #946: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (for Curator)

2019-05-30 Thread GitBox
JiriOndrusek commented on issue #946: [ZOOKEEPER-3389] Zookeeper does not 
export all required packages in OSGi (for Curator)
URL: https://github.com/apache/zookeeper/pull/946#issuecomment-497373054
 
 
   @nkalmar would it be possible to merge ant part - this PR (for purposes of 
3.4.x) and merge maven part as soon as is master finished?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar commented on issue #136: [ZOOKEEPER-1416] Persistent Recursive Watch

2019-05-30 Thread GitBox
anmolnar commented on issue #136: [ZOOKEEPER-1416] Persistent Recursive Watch
URL: https://github.com/apache/zookeeper/pull/136#issuecomment-497382576
 
 
   @eolivelli Not yet unfortunately. I'm going to have a new baby boy next 
week, so not sure how much spare time I'll have for code reviews, but I'll do 
my best. ;)


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] ashashwat commented on issue #960: Fix typos and grammar in zookeeper docs

2019-05-30 Thread GitBox
ashashwat commented on issue #960: Fix typos and grammar in zookeeper docs
URL: https://github.com/apache/zookeeper/pull/960#issuecomment-497369647
 
 
   @nkalmar  Done.  The Jenkins green has been eluding this pull request though.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] JiriOndrusek commented on issue #946: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (for Curator)

2019-05-30 Thread GitBox
JiriOndrusek commented on issue #946: [ZOOKEEPER-3389] Zookeeper does not 
export all required packages in OSGi (for Curator)
URL: https://github.com/apache/zookeeper/pull/946#issuecomment-497372439
 
 
   hi, @nkalmar problem with master branch is, that it is not finished: There 
has to be made a decision how to continue with this problem 
(https://github.com/apache/zookeeper/pull/945#issuecomment-493015133). As soon 
as the proper way is selected, I could finish master and then backport it here. 
With the time distance (from the master PR creation) I tend to a solution, with 
a new module -  only for osgi. I've prepared prototype here: 
https://github.com/JiriOndrusek/zookeeper/commits/zookeeper-osgi-module


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] Randgalt commented on issue #136: [ZOOKEEPER-1416] Persistent Recursive Watch

2019-05-30 Thread GitBox
Randgalt commented on issue #136: [ZOOKEEPER-1416] Persistent Recursive Watch
URL: https://github.com/apache/zookeeper/pull/136#issuecomment-497384296
 
 
   I'm still around. If it's worth my effort I can rebase.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] anmolnar commented on issue #136: [ZOOKEEPER-1416] Persistent Recursive Watch

2019-05-30 Thread GitBox
anmolnar commented on issue #136: [ZOOKEEPER-1416] Persistent Recursive Watch
URL: https://github.com/apache/zookeeper/pull/136#issuecomment-497383103
 
 
   I recommend not cutting `3.6.0` until these big feature candidates are 
reviewed. We should start a discussion on the dev list soon.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] asfgit closed pull request #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
asfgit closed pull request #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint
URL: https://github.com/apache/zookeeper/pull/965
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] vladimirivic commented on a change in pull request #953: ZOOKEEPER-3398 Learner.connectToLeader() may take too long to time-out

2019-06-03 Thread GitBox
vladimirivic commented on a change in pull request #953: ZOOKEEPER-3398 
Learner.connectToLeader() may take too long to time-out 
URL: https://github.com/apache/zookeeper/pull/953#discussion_r289949284
 
 

 ##
 File path: conf/zoo_sample.cfg
 ##
 @@ -6,6 +6,9 @@ initLimit=10
 # The number of ticks that can pass between 
 # sending a request and getting an acknowledgement
 syncLimit=5
+# The number of ticks that followers can take
+# to connect to the leader after leader election
+connectToLeaderLimit=5
 
 Review comment:
   I will update the pull request to reflect the suggested changes. I will be 
renaming connectToLeaderLimit to connectToLearnerMasterLimit 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with -Xdoclint

2019-06-03 Thread GitBox
eolivelli commented on issue #965: ZOOKEEPER-3409 Compile Java code with 
-Xdoclint
URL: https://github.com/apache/zookeeper/pull/965#issuecomment-498341300
 
 
   retest maven build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] enixon commented on issue #939: ZOOKEEPER-3385: Add admin command to display leader

2019-06-03 Thread GitBox
enixon commented on issue #939: ZOOKEEPER-3385: Add admin command to display 
leader
URL: https://github.com/apache/zookeeper/pull/939#issuecomment-498457960
 
 
   retest maven build


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] maoling commented on issue #960: Fix typos and grammar in zookeeper docs

2019-06-03 Thread GitBox
maoling commented on issue #960: Fix typos and grammar in zookeeper docs
URL: https://github.com/apache/zookeeper/pull/960#issuecomment-498483418
 
 
   retest this please


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] hanm commented on a change in pull request #944: ZOOKEEPER-3388: Allow client port to support plaintext and encrypted …

2019-06-03 Thread GitBox
hanm commented on a change in pull request #944: ZOOKEEPER-3388: Allow client 
port to support plaintext and encrypted …
URL: https://github.com/apache/zookeeper/pull/944#discussion_r290112464
 
 

 ##
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxnFactory.java
 ##
 @@ -63,16 +69,26 @@
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.common.ClientX509Util;
 import org.apache.zookeeper.common.NettyUtils;
+import org.apache.zookeeper.common.SSLContextAndOptions;
 import org.apache.zookeeper.common.X509Exception;
 import org.apache.zookeeper.common.X509Exception.SSLContextException;
 import org.apache.zookeeper.server.auth.ProviderRegistry;
 import org.apache.zookeeper.server.auth.X509AuthenticationProvider;
+import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class NettyServerCnxnFactory extends ServerCnxnFactory {
 private static final Logger LOG = 
LoggerFactory.getLogger(NettyServerCnxnFactory.class);
 
+/**
+ * Allow client-server sockets to accept both SSL and plaintext connections
+ */
+public static final String PORT_UNIFICATION_KEY = 
"zookeeper.client.portUnification";
+private final boolean shouldUsePortUnification;
+
+private static final byte TLS_HANDSHAKE_RECORD_TYPE = 0x16;
 
 Review comment:
   might worth to add a comment here on this value (like a link to an RFC).


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] hanm commented on a change in pull request #944: ZOOKEEPER-3388: Allow client port to support plaintext and encrypted …

2019-06-03 Thread GitBox
hanm commented on a change in pull request #944: ZOOKEEPER-3388: Allow client 
port to support plaintext and encrypted …
URL: https://github.com/apache/zookeeper/pull/944#discussion_r290111854
 
 

 ##
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxnFactory.java
 ##
 @@ -315,37 +428,47 @@ protected void initChannel(SocketChannel ch) throws 
Exception {
 this.bootstrap.validate();
 }
 
-private synchronized void initSSL(ChannelPipeline p)
-throws X509Exception, KeyManagementException, 
NoSuchAlgorithmException {
+private synchronized void initSSL(ChannelPipeline p, boolean 
supportPlaintext)
+throws X509Exception, KeyManagementException, 
NoSuchAlgorithmException, SSLException {
 String authProviderProp = 
System.getProperty(x509Util.getSslAuthProviderProperty());
-SSLContext sslContext;
 if (authProviderProp == null) {
-sslContext = x509Util.getDefaultSSLContext();
+SSLContextAndOptions sslContextAndOptions = 
x509Util.getDefaultSSLContextAndOptions();
+SslContext nettySslContext = 
sslContextAndOptions.createNettyJdkSslContext(
+sslContextAndOptions.getSSLContext(), false);
+
+if (supportPlaintext) {
+p.addLast("ssl", new DualModeSslHandler(nettySslContext));
+LOG.debug("dual mode Java SSL handler added for channel: {}", 
p.channel());
+} else {
+p.addLast("ssl", 
nettySslContext.newHandler(p.channel().alloc()));
+LOG.debug("Java SSL handler added for channel: {}", 
p.channel());
+}
 } else {
-sslContext = SSLContext.getInstance("TLSv1");
+SSLContext sslContext = 
SSLContext.getInstance(ClientX509Util.DEFAULT_PROTOCOL);
 X509AuthenticationProvider authProvider =
-(X509AuthenticationProvider)ProviderRegistry.getProvider(
+(X509AuthenticationProvider) ProviderRegistry.getProvider(
 
System.getProperty(x509Util.getSslAuthProviderProperty(), "x509"));
 
-if (authProvider == null)
-{
+if (authProvider == null) {
 LOG.error("Auth provider not found: {}", authProviderProp);
 throw new SSLContextException(
 "Could not create SSLContext with specified auth 
provider: " +
-authProviderProp);
+authProviderProp);
 }
 
-sslContext.init(new X509KeyManager[] { 
authProvider.getKeyManager() },
-new X509TrustManager[] { 
authProvider.getTrustManager() },
-null);
+sslContext.init(new X509KeyManager[]{authProvider.getKeyManager()},
+new X509TrustManager[]{authProvider.getTrustManager()},
+null);
+SslContext nettySslContext = 
x509Util.getDefaultSSLContextAndOptions()
+.createNettyJdkSslContext(sslContext,false);
+if (supportPlaintext) {
 
 Review comment:
   This looks like a duplicate of previous `if (supportPlaintext)` on L439, we 
can unify them to avoid code duplication.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] GavinAlison closed pull request #966: Branch 3.5.5 running zookeeper can't start on linux_64 system

2019-06-04 Thread GitBox
GavinAlison closed pull request #966: Branch 3.5.5running zookeeper can't 
start on linux_64 system
URL: https://github.com/apache/zookeeper/pull/966
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] lvfangmin commented on issue #878: ZOOKEEPER-3339: Improve Debug and Trace Log Statements

2019-06-05 Thread GitBox
lvfangmin commented on issue #878: ZOOKEEPER-3339: Improve Debug and Trace Log 
Statements
URL: https://github.com/apache/zookeeper/pull/878#issuecomment-499301662
 
 
   I'll get this merged after the conflict is resolved.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] lvfangmin commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation

2019-06-05 Thread GitBox
lvfangmin commented on a change in pull request #959: ZOOKEEPER-3402: Add 
multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#discussion_r290948708
 
 

 ##
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/MultiTransactionRecord.java
 ##
 @@ -51,14 +56,32 @@ public MultiTransactionRecord(Iterable ops) {
 return ops.iterator() ;
 }
 
-public void add(Op op) {
+public void add(Op op) throws IllegalArgumentException {
+setOrCheckOpKind(op.getKind());
 ops.add(op);
 }
 
 public int size() {
 return ops.size();
 }
 
+/**
+ * Returns the kind of the operations contained by the record.
+ * @return  The OpKind value of all the elements in the record.
+ */
+public Op.OpKind getOpKind() {
+return opKind;
+}
+
+private void setOrCheckOpKind(Op.OpKind ok) throws 
IllegalArgumentException {
+if(opKind == null) {
 
 Review comment:
   nit: space after if 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] lvfangmin commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation

2019-06-05 Thread GitBox
lvfangmin commented on a change in pull request #959: ZOOKEEPER-3402: Add 
multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#discussion_r290948493
 
 

 ##
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java
 ##
 @@ -574,6 +585,41 @@ public void processRequest(Request request) {
 }
 }
 
+private Record handleReadRequest(int opCode, Record request, ServerCnxn 
cnxn, List authInfo)
+throws KeeperException, IOException {
+switch(opCode) {
+case OpCode.getChildren: {
+GetChildrenRequest getChildrenRequest = (GetChildrenRequest) 
request;
 
 Review comment:
   Please refactor the code to reuse existing logic for getChildren and 
getData, which makes it easier to maintain in the future.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] lvfangmin commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation

2019-06-05 Thread GitBox
lvfangmin commented on a change in pull request #959: ZOOKEEPER-3402: Add 
multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#discussion_r290948727
 
 

 ##
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/MultiTransactionRecord.java
 ##
 @@ -51,14 +56,32 @@ public MultiTransactionRecord(Iterable ops) {
 return ops.iterator() ;
 }
 
-public void add(Op op) {
+public void add(Op op) throws IllegalArgumentException {
+setOrCheckOpKind(op.getKind());
 ops.add(op);
 }
 
 public int size() {
 return ops.size();
 }
 
+/**
+ * Returns the kind of the operations contained by the record.
+ * @return  The OpKind value of all the elements in the record.
+ */
+public Op.OpKind getOpKind() {
+return opKind;
+}
+
+private void setOrCheckOpKind(Op.OpKind ok) throws 
IllegalArgumentException {
+if(opKind == null) {
+opKind = ok;
+} else if(ok != opKind) {
 
 Review comment:
   ditto.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] lvfangmin commented on issue #969: ZOOKEEPER-3416: Remove redundant ServerCnxnFactoryAccessor.

2019-06-05 Thread GitBox
lvfangmin commented on issue #969: ZOOKEEPER-3416: Remove redundant 
ServerCnxnFactoryAccessor.
URL: https://github.com/apache/zookeeper/pull/969#issuecomment-499268519
 
 
   retest this please.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] Geker edited a comment on issue #968: ZKUtil deleteRecursive check LOG Level before calculate the parameter

2019-06-05 Thread GitBox
Geker edited a comment on issue #968: ZKUtil  deleteRecursive check LOG Level 
before calculate the parameter
URL: https://github.com/apache/zookeeper/pull/968#issuecomment-499305744
 
 
   > I don't think explicit calls on`LOG.isDebugEnabled` is needed (I always 
prefer writing less code if possible) here when using parameterized logging, 
because the parameters will not be evaluated until the condition check passes. 
See https://www.slf4j.org/faq.html#logging_performance.
   @hanm
   The fix   prevent invoke  tree.toString(),which will double the heap usage 
and  may cause OOM,even if you change the level to ERROR.
   parameterized logging can't prevent tree.toString()


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] Geker edited a comment on issue #968: ZKUtil deleteRecursive check LOG Level before calculate the parameter

2019-06-05 Thread GitBox
Geker edited a comment on issue #968: ZKUtil  deleteRecursive check LOG Level 
before calculate the parameter
URL: https://github.com/apache/zookeeper/pull/968#issuecomment-499345965
 
 
   > You can use `LOG.debug("Deleting {}",tree)` where we can save both a debug 
condition check and avoid invoking of tree.toString if debug is not enabled. 
Just don't call `tree.toString` explicitly.
   
   3ks, I changed the code.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] asfgit closed pull request #960: Fix typos and grammar in zookeeper docs

2019-06-04 Thread GitBox
asfgit closed pull request #960: Fix typos and grammar in zookeeper docs
URL: https://github.com/apache/zookeeper/pull/960
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


  1   2   3   4   5   6   7   8   9   10   >