diff options
author | Martin Polden <mpolden@mpolden.no> | 2022-01-13 13:20:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 13:20:56 +0100 |
commit | a3b2a522888b306512160890b27217eaab72ccb5 (patch) | |
tree | 6aa96c9abb29e3a7d713fb0b67b60cd8b2549dd0 /controller-api | |
parent | 8630e91bd9e38613a3c56f547d12a2d93f0eb339 (diff) | |
parent | 7834d2d49a903352185d147f4d3ed7c260981134 (diff) |
Merge pull request #20793 from vespa-engine/mpolden/remove-global-routing-service
Remove unused GlobalRoutingService
Diffstat (limited to 'controller-api')
3 files changed, 1 insertions, 54 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java index d4e11163343..b36d7880506 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java @@ -3,9 +3,9 @@ package com.yahoo.vespa.hosted.controller.api.integration; import com.yahoo.vespa.hosted.controller.api.integration.archive.ArchiveService; import com.yahoo.vespa.hosted.controller.api.integration.athenz.AccessControlService; -import com.yahoo.vespa.hosted.controller.api.integration.aws.RoleService; import com.yahoo.vespa.hosted.controller.api.integration.aws.CloudEventFetcher; import com.yahoo.vespa.hosted.controller.api.integration.aws.ResourceTagger; +import com.yahoo.vespa.hosted.controller.api.integration.aws.RoleService; import com.yahoo.vespa.hosted.controller.api.integration.billing.BillingController; import com.yahoo.vespa.hosted.controller.api.integration.billing.BillingDatabaseClient; import com.yahoo.vespa.hosted.controller.api.integration.billing.PlanRegistry; @@ -28,7 +28,6 @@ import com.yahoo.vespa.hosted.controller.api.integration.organization.SystemMoni import com.yahoo.vespa.hosted.controller.api.integration.resource.CostReportConsumer; import com.yahoo.vespa.hosted.controller.api.integration.resource.MeteringClient; import com.yahoo.vespa.hosted.controller.api.integration.resource.ResourceDatabaseClient; -import com.yahoo.vespa.hosted.controller.api.integration.routing.GlobalRoutingService; import com.yahoo.vespa.hosted.controller.api.integration.secrets.TenantSecretService; import com.yahoo.vespa.hosted.controller.api.integration.user.RoleMaintainer; import com.yahoo.vespa.hosted.controller.api.integration.vcmr.ChangeRequestClient; @@ -50,8 +49,6 @@ public interface ServiceRegistry { NameService nameService(); - GlobalRoutingService globalRoutingService(); - Mailer mailer(); EndpointCertificateProvider endpointCertificateProvider(); diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/GlobalRoutingService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/GlobalRoutingService.java deleted file mode 100644 index e14a5a5d562..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/GlobalRoutingService.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.api.integration.routing; - -import com.yahoo.config.provision.zone.ZoneId; - -import java.util.Map; - -/** - * A service containing the health status of global rotations. - * - * @author mpolden - */ -public interface GlobalRoutingService { - - /** Returns the health status of each zone behind the given rotation name */ - Map<ZoneId, RotationStatus> getHealthStatus(String rotationName); - -} diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/MemoryGlobalRoutingService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/MemoryGlobalRoutingService.java deleted file mode 100644 index 5d51030a329..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/MemoryGlobalRoutingService.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.api.integration.routing; - -import com.yahoo.component.AbstractComponent; -import com.yahoo.config.provision.zone.ZoneId; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * @author bratseth - */ -public class MemoryGlobalRoutingService extends AbstractComponent implements GlobalRoutingService { - - private final Map<String, Map<ZoneId, RotationStatus>> status = new HashMap<>(); - - @Override - public Map<ZoneId, RotationStatus> getHealthStatus(String rotationName) { - if (status.isEmpty()) { - return Map.of(ZoneId.from("prod", "us-west-1"), RotationStatus.IN); - } - return Collections.unmodifiableMap(status.getOrDefault(rotationName, Map.of())); - } - - public MemoryGlobalRoutingService setStatus(String rotation, ZoneId zone, RotationStatus status) { - this.status.putIfAbsent(rotation, new HashMap<>()); - this.status.get(rotation).put(zone, status); - return this; - } - -} |