Skip to content

Commit

Permalink
Fix config for metaclient leader election client. (#2807)
Browse files Browse the repository at this point in the history
  • Loading branch information
xyuanlu authored Jun 11, 2024
1 parent b7d771e commit 55bdc08
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ public LeaderElectionClient(MetaClientConfig metaClientConfig, String participan
LOG.info("Creating MetaClient for LeaderElectionClient");
if (MetaClientConfig.StoreType.ZOOKEEPER.equals(metaClientConfig.getStoreType())) {
ZkMetaClientConfig zkMetaClientConfig = new ZkMetaClientConfig.ZkMetaClientConfigBuilder().setConnectionAddress(
metaClientConfig.getConnectionAddress()).setZkSerializer((new LeaderInfoSerializer())).build();
metaClientConfig.getConnectionAddress())
.setZkSerializer((new LeaderInfoSerializer()))
.setSessionTimeoutInMillis(metaClientConfig.getSessionTimeoutInMillis())
.setMetaClientReconnectPolicy(metaClientConfig.getMetaClientReconnectPolicy())
.setConnectionInitTimeoutInMillis(metaClientConfig.getConnectionInitTimeoutInMillis())
.setAuthEnabled(metaClientConfig.isAuthEnabled())
.build();
_metaClient = new ZkMetaClientFactory().getMetaClient(zkMetaClientConfig);
_metaClient.connect();
_metaClient.subscribeStateChanges(_connectStateListener);
Expand Down

0 comments on commit 55bdc08

Please sign in to comment.