diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-03-25 10:59:26 +0100 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2021-03-25 10:59:26 +0100 |
commit | 0cbdd1afb5740e9a514eeb0a9607ea42597c854c (patch) | |
tree | 5c93e7621908c2df49c6efd13dbf337ed819231d /configserver | |
parent | 1c9384f66caafbbace0058ce03a835765b717984 (diff) |
Simplify constructor
Diffstat (limited to 'configserver')
3 files changed, 5 insertions, 11 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/application/TenantApplications.java b/configserver/src/main/java/com/yahoo/vespa/config/server/application/TenantApplications.java index a3fda1870f8..62ade4d753d 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/application/TenantApplications.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/application/TenantApplications.java @@ -243,6 +243,7 @@ public class TenantApplications implements RequestHandler, HostValidator<Applica // (when getting event from zookeeper to remove application, // the lock should be held by the thread that causes the event to happen) public void removeApplication(ApplicationId applicationId) { + log.log(Level.FINE, "Removing application " + applicationId); if (exists(applicationId)) { log.log(Level.INFO, "Tried removing application " + applicationId + ", but it seems to have been deployed again"); return; diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/Tenant.java b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/Tenant.java index f8299bdba1a..6e2402f40cc 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/Tenant.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/Tenant.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.config.server.tenant; import com.yahoo.config.provision.TenantName; @@ -10,8 +10,7 @@ import com.yahoo.vespa.config.server.session.SessionRepository; import java.time.Instant; /** - * Contains all tenant-level components for a single tenant, dealing with editing sessions and - * applications for a single tenant. + * Tenant, mostly a wrapper for sessions and applications belonging to a tenant * * @author vegardh * @author Ulf Lilleengen @@ -31,22 +30,16 @@ public class Tenant { // Protected due to being subclassed in a system test protected Tenant(TenantName name, SessionRepository sessionRepository, - RequestHandler requestHandler, TenantApplications applicationRepo, Instant created) { this.name = name; this.path = TenantRepository.getTenantPath(name); - this.requestHandler = requestHandler; + this.requestHandler = applicationRepo; this.sessionRepository = sessionRepository; this.applicationRepo = applicationRepo; this.created = created; } - /** - * The request handler for this - * - * @return handler - */ public RequestHandler getRequestHandler() { return requestHandler; } diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java index 0c2d69ad882..13d8908d197 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java @@ -354,7 +354,7 @@ public class TenantRepository { tenantListener); log.log(Level.INFO, "Adding tenant '" + tenantName + "'" + ", created " + created + ". Bootstrapping in " + Duration.between(start, Instant.now())); - Tenant tenant = new Tenant(tenantName, sessionRepository, applicationRepo, applicationRepo, created); + Tenant tenant = new Tenant(tenantName, sessionRepository, applicationRepo, created); createAndWriteTenantMetaData(tenant); tenants.putIfAbsent(tenantName, tenant); notifyNewTenant(tenant); |