diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-12-14 10:39:11 +0100 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2020-12-14 10:39:11 +0100 |
commit | 5e933b7a8e75bae020e504dbc35e61faaceafa59 (patch) | |
tree | 7adb8f868d5154c31db23e4ab694b573f07de995 /clustercontroller-apps | |
parent | e752af8a5e6b462caed8faaeff0aafa30417c912 (diff) |
Use CuratorFramework.blockUntilConnected() to verify connection
Diffstat (limited to 'clustercontroller-apps')
-rw-r--r-- | clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java index 26ad2784b26..eba3b35fcb2 100644 --- a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java +++ b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java @@ -96,16 +96,12 @@ public class ClusterController extends AbstractComponent } /** - * Creates a path in zookeeper for this fleetcontroller. Seems like this is meant as a check - * that zookeeper server is up and that we are able to do operations against it. + * Block until we are connected to zookeeper server */ private void verifyThatZooKeeperWorks(FleetControllerOptions options) throws Exception { if (options.zooKeeperServerAddress != null && !"".equals(options.zooKeeperServerAddress)) { - String path = "/" + options.clusterName + options.fleetControllerIndex; Curator curator = Curator.create(options.zooKeeperServerAddress); - if (curator.framework().checkExists().forPath(path) != null) - curator.framework().delete().deletingChildrenIfNeeded().forPath(path); - curator.framework().create().creatingParentsIfNeeded().forPath(path); + curator.framework().blockUntilConnected(); } } |