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 2020/08/10 21:19:08 UTC

[GitHub] [helix] narendly commented on a change in pull request #1243: Make HelixCustomCodeRunner multi-ZK aware

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:
users@infra.apache.org



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