kaisun2000 commented on a change in pull request #745: Add RealmAwareZkClient and RealmAwareZkClientFactory interfaces URL: https://github.com/apache/helix/pull/745#discussion_r379131214
########## 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: FederatedZkClient is always multi. The implementation of FederateZkClient can assume this without you passing a mode. The problem is that if you pass a non-multi, it need to handle it then. ---------------------------------------------------------------- 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