summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-12-09 07:15:03 +0100
committerGitHub <noreply@github.com>2020-12-09 07:15:03 +0100
commitbcf36102b997b4276830706562ea9cb57ea1c15e (patch)
tree61be87a5246d0097f896b1397642818049b1f373
parentd1f0faa718a3bd085e6f45adb5013d0c73d520b0 (diff)
parent7989568893e39cc8eb1b79eed45af94610b6f967 (diff)
Merge pull request #15737 from vespa-engine/hmusum/remove-clustercontroller-code-that-deletes-and-creates-zookeeper-node
Remove code that nobody understands the need for
-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);