narendly commented on a change in pull request #745: Add RealmAwareZkClient and 
RealmAwareZkClientFactory interfaces
URL: https://github.com/apache/helix/pull/745#discussion_r379124444
 
 

 ##########
 File path: 
zookeeper-api/src/main/java/org/apache/helix/zookeeper/api/client/RealmAwareZkClient.java
 ##########
 @@ -306,48 +326,63 @@ public int hashCode() {
   }
 
   /**
-   * Configuration for creating a new ZkConnection.
+   * ZkConnection-related configs for creating an instance of 
RealmAwareZkClient.
    */
-  class ZkConnectionConfig {
-    // Connection configs
-    private final String _zkServers;
-    private int _sessionTimeout = HelixZkClient.DEFAULT_SESSION_TIMEOUT;
+  class RealmAwareZkConnectionConfig {
+    /**
+     * mode: Which mode the RealmAwareZkClientConfig should be created in
+     */
+    private final MODE _mode;
+    /**
+     * zkRealmShardingKey: used to deduce which ZK realm this 
RealmAwareZkClientConfig should connect to.
+     * NOTE: this field will be ignored if MODE is MULTI_REALM!
+     */
+    private final String _zkRealmShardingKey;
+    private int _sessionTimeout = DEFAULT_SESSION_TIMEOUT;
 
-    public ZkConnectionConfig(String zkServers) {
-      _zkServers = zkServers;
+    public RealmAwareZkConnectionConfig(MODE mode, String zkRealmShardingKey) {
 
 Review comment:
   I am thinking that we would use this for FederatedZkClient as well since 
FederatedZkClient is an implementation of RealmAwareZkClient. With that said, 
this is necessary because the mode will have to be different.
   
   So mode is not necessarily encoded in the type.

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

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

Reply via email to