qqu0127 commented on code in PR #2325:
URL: https://github.com/apache/helix/pull/2325#discussion_r1061083101


##########
zookeeper-api/src/main/java/org/apache/helix/zookeeper/impl/client/ZkClient.java:
##########
@@ -85,7 +88,20 @@ public class ZkClient extends 
org.apache.helix.zookeeper.zkclient.ZkClient imple
    *            The JMX bean name will be: 
HelixZkClient.monitorType.monitorKey.monitorInstanceName.
    * @param monitorRootPathOnly
    *            Should only stat of access to root path be reported to JMX 
bean or path-specific stat be reported too.
+   * @param connectOnInit true if connect to ZK during initialization, 
otherwise user will need to call connect
+   *                      explicitly before talking to ZK.
    */
+  public ZkClient(IZkConnection zkConnection, Watcher watcher, int 
connectionTimeout, long operationRetryTimeout,
+      PathBasedZkSerializer zkSerializer,
+      String monitorType, String monitorKey, String monitorInstanceName,
+      boolean monitorRootPathOnly, boolean connectOnInit) {
+    super(zkConnection, watcher, operationRetryTimeout, zkSerializer, 
monitorType, monitorKey, monitorInstanceName,
+        monitorRootPathOnly);
+    if (connectOnInit) {
+      connect(connectionTimeout, watcher);
+    }

Review Comment:
   This PR alone is fully backward compatible. The new feature is backward 
compatible, and will be used in meta-client implementation. 
   (however, with our offline discussion, most of this PR will not be used with 
the change of implementation)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to