narendly commented on a change in pull request #1243:
URL: https://github.com/apache/helix/pull/1243#discussion_r468191812



##########
File path: 
helix-core/src/main/java/org/apache/helix/participant/HelixCustomCodeRunner.java
##########
@@ -130,14 +147,23 @@ public void start() throws Exception {
 
     StateMachineEngine stateMach = _manager.getStateMachineEngine();
     stateMach.registerStateModelFactory(LEADER_STANDBY, _stateModelFty, 
_resourceName);
-    HelixZkClient zkClient = null;
+    RealmAwareZkClient zkClient = null;
     try {
       // manually add ideal state for participant leader using LeaderStandby
       // model
-      HelixZkClient.ZkClientConfig clientConfig = new 
HelixZkClient.ZkClientConfig();
-      clientConfig.setZkSerializer(new ZNRecordSerializer());
-      zkClient = SharedZkClientFactory.getInstance()
-          .buildZkClient(new HelixZkClient.ZkConnectionConfig(_zkAddr), 
clientConfig);
+      if (Boolean.getBoolean(SystemPropertyKeys.MULTI_ZK_ENABLED) || _zkAddr 
== null) {

Review comment:
       The whole point of FederatedZkClient is not using a particular 
ZkAddress, but rather rely on RealmAwareConnectionConfig to establish a 
multi-zk connection, so this makes sense. The sharding key information is 
included in the connection config.




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to