aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-apps
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-12-15 09:15:17 +0100
committerHarald Musum <musum@verizonmedia.com>2020-12-15 09:15:17 +0100
commit1e070af1c3e7798204df705aea017ed67a5bc8f5 (patch)
tree524365c29a19a540303d5c60905df42a3c22edb6 /clustercontroller-apps
parenta10f8b332ab69f7674962e9ae45a8f55799e2c62 (diff)
Stop depending on ZooKeeperProvider
VespaZooKeeperServer is enough, ZooKeeperProvider is just an unnecessary extra layer. In addition neither provides any guarantee that the the server has started and is working. ClusterController has code that verifies that connecting to zookeeper works, that should be sufficient.
Diffstat (limited to 'clustercontroller-apps')
-rw-r--r--clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java12
-rw-r--r--clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/DummyZooKeeperProvider.java10
-rw-r--r--clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StandaloneZooKeeperProvider.java16
-rw-r--r--clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ZooKeeperProvider.java10
4 files changed, 1 insertions, 47 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 9020765f777..52a37c9489e 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
@@ -1,4 +1,4 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.apps.clustercontroller;
import com.google.inject.Inject;
@@ -29,21 +29,11 @@ public class ClusterController extends AbstractComponent
private final Map<String, FleetController> controllers = new TreeMap<>();
private final Map<String, StatusHandler.ContainerStatusPageServer> status = new TreeMap<>();
- /**
- * Dependency injection constructor for controller. {@link ZooKeeperProvider} argument given
- * to ensure that zookeeper has started before we start polling it.
- */
- @SuppressWarnings("unused")
@Inject
- public ClusterController(ZooKeeperProvider zooKeeperProvider) {
- this();
- }
-
ClusterController() {
metricWrapper = new JDiscMetricWrapper(null);
}
-
public void setOptions(FleetControllerOptions options, Metric metricImpl) throws Exception {
metricWrapper.updateMetricImplementation(metricImpl);
verifyThatZooKeeperWorks(options);
diff --git a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/DummyZooKeeperProvider.java b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/DummyZooKeeperProvider.java
deleted file mode 100644
index f961297643e..00000000000
--- a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/DummyZooKeeperProvider.java
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.clustercontroller.apps.clustercontroller;
-
-/**
- * A dummy zookeeper provider when we do not run our own zookeeper instance.
- *
- * @author Ulf Lilleengen
- */
-public class DummyZooKeeperProvider implements ZooKeeperProvider {
-}
diff --git a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StandaloneZooKeeperProvider.java b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StandaloneZooKeeperProvider.java
deleted file mode 100644
index baad012a234..00000000000
--- a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StandaloneZooKeeperProvider.java
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.clustercontroller.apps.clustercontroller;
-
-import com.yahoo.vespa.zookeeper.VespaZooKeeperServer;
-
-/**
- * ZooKeeper provider that ensures we are running our own instance of zookeeper.
- *
- * @author Ulf Lilleengen
- */
-public class StandaloneZooKeeperProvider implements ZooKeeperProvider {
-
- public StandaloneZooKeeperProvider(VespaZooKeeperServer server) {
- }
-
-}
diff --git a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ZooKeeperProvider.java b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ZooKeeperProvider.java
deleted file mode 100644
index bb18bcc65d6..00000000000
--- a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ZooKeeperProvider.java
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.clustercontroller.apps.clustercontroller;
-
-/**
- * Abstraction we can depend on providing us with a zookeeper server being up.
- *
- * @author Ulf Lilleengen
- */
-public interface ZooKeeperProvider {
-}