You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/12/18 18:18:03 UTC

[GitHub] [helix] dasahcc commented on a change in pull request #1526: Leverage zk paginated getChildren API for ZkClient to fetch a large number of children

dasahcc commented on a change in pull request #1526:
URL: https://github.com/apache/helix/pull/1526#discussion_r546005138



##########
File path: zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkConnection.java
##########
@@ -192,4 +234,59 @@ public String getServers() {
   public void addAuthInfo(String scheme, byte[] auth) {
     _zk.addAuthInfo(scheme, auth);
   }
+
+  private void lookupGetChildrenMethod() {

Review comment:
       Is this one time look up? Why we dont do it at initial stage and make it final?

##########
File path: zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkConnection.java
##########
@@ -36,16 +38,23 @@
 import org.apache.zookeeper.ZooKeeper.States;
 import org.apache.zookeeper.data.ACL;
 import org.apache.zookeeper.data.Stat;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ZkConnection implements IZkConnection {
-  private static final Logger LOG = Logger.getLogger(ZkConnection.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ZkConnection.class);
 
   /** It is recommended to use quite large sessions timeouts for ZooKeeper. */
   private static final int DEFAULT_SESSION_TIMEOUT = 30000;
 
+  // A config to force disabling using ZK's paginated getChildren.
+  // By default the value is false.
+  private static final boolean GETCHILDREN_PAGINATION_DISABLED =

Review comment:
       Would this cause problem if default is enabled? Let's say server version is not supporting that. Then our getChildren will keep failing in looking up the method?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org