aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-apps
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-12-08 13:27:47 +0100
committerHarald Musum <musum@verizonmedia.com>2020-12-08 13:27:47 +0100
commit7989568893e39cc8eb1b79eed45af94610b6f967 (patch)
tree502b62b952333bdd417e8e16a5acf8cc35ed7cd6 /clustercontroller-apps
parentf1bd49e766f563503e1bfa7c9ac974f4bf6e754f (diff)
Remove code that nobody undrstands the need for
Cannot find any usage of nodes created. This might be some initialization code to check if operations work, but I cannot see the need for it. If this breaks something we can at least document why this is needed.
Diffstat (limited to 'clustercontroller-apps')
-rw-r--r--clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java13
1 files changed, 2 insertions, 11 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 b04f04abfb6..75ea7000e4c 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;
@@ -10,7 +10,6 @@ import com.yahoo.vespa.clustercontroller.core.FleetControllerOptions;
import com.yahoo.vespa.clustercontroller.core.RemoteClusterControllerTaskScheduler;
import com.yahoo.vespa.clustercontroller.core.restapiv2.ClusterControllerStateRestAPI;
import com.yahoo.vespa.clustercontroller.core.status.StatusHandler;
-import com.yahoo.vespa.curator.Curator;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -34,6 +33,7 @@ public class ClusterController extends AbstractComponent
* to ensure that zookeeper has started before we start polling it.
*/
@Inject
+ @SuppressWarnings("unused")
public ClusterController(ZooKeeperProvider zooKeeperProvider) {
this();
}
@@ -45,17 +45,8 @@ public class ClusterController extends AbstractComponent
public void setOptions(String clusterName, FleetControllerOptions options, Metric metricImpl) throws Exception {
metricWrapper.updateMetricImplementation(metricImpl);
- if (options.zooKeeperServerAddress != null && !"".equals(options.zooKeeperServerAddress)) {
- // Wipe this path ... it's unclear why
- 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);
- }
synchronized (controllers) {
FleetController controller = controllers.get(clusterName);
-
if (controller == null) {
StatusHandler.ContainerStatusPageServer statusPageServer = new StatusHandler.ContainerStatusPageServer();
controller = FleetController.create(options, statusPageServer, metricWrapper);