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 2019/11/13 19:34:01 UTC

[GitHub] [helix] narendly commented on a change in pull request #592: Add a ZkAddress-based constructor for ConfigAccessor

narendly commented on a change in pull request #592: Add a ZkAddress-based constructor for ConfigAccessor
URL: https://github.com/apache/helix/pull/592#discussion_r345959825
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/ConfigAccessor.java
 ##########
 @@ -67,14 +68,30 @@
     // @formatter:on
   }
 
-  private final HelixZkClient zkClient;
+  private final HelixZkClient _zkClient;
+  // true if ConfigAccessor was instantiated with a HelixZkClient, false otherwise
+  // This is used for close() to determine how ConfigAccessor should close the underlying ZkClient
+  private boolean _usesExternalZkClient;
 
   /**
    * Initialize an accessor with a Zookeeper client
+   * Note: it is recommended to use the other constructor instead to avoid having to create a HelixZkClient.
    * @param zkClient
    */
   public ConfigAccessor(HelixZkClient zkClient) {
-    this.zkClient = zkClient;
+    this._zkClient = zkClient;
 
 Review comment:
   Removed.

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


With regards,
Apache Git Services

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