This is an automated email from the ASF dual-hosted git repository.
xyuanlu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
The following commit(s) were added to refs/heads/master by this push:
new 55bdc0800 Fix config for metaclient leader election client. (#2807)
55bdc0800 is described below
commit 55bdc0800a0b6f077d084c593a22931f2a059c79
Author: xyuanlu <[email protected]>
AuthorDate: Tue Jun 11 13:52:13 2024 -0700
Fix config for metaclient leader election client. (#2807)
---
.../metaclient/recipes/leaderelection/LeaderElectionClient.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/meta-client/src/main/java/org/apache/helix/metaclient/recipes/leaderelection/LeaderElectionClient.java
b/meta-client/src/main/java/org/apache/helix/metaclient/recipes/leaderelection/LeaderElectionClient.java
index 373d36013..ae7d9c9fa 100644
---
a/meta-client/src/main/java/org/apache/helix/metaclient/recipes/leaderelection/LeaderElectionClient.java
+++
b/meta-client/src/main/java/org/apache/helix/metaclient/recipes/leaderelection/LeaderElectionClient.java
@@ -97,7 +97,13 @@ public class LeaderElectionClient implements AutoCloseable {
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);