From d4e6d4ec97f8b1b9df19e81fc143664cea5d2e82 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Tue, 13 Feb 2018 14:03:18 +0100 Subject: Give name to a few executor services --- .../java/com/yahoo/vespa/config/server/ApplicationRepository.java | 4 +++- .../java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'configserver') diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java index 967cb06a13a..55c08297b43 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java @@ -5,6 +5,7 @@ import com.google.inject.Inject; import com.yahoo.cloud.config.ConfigserverConfig; import com.yahoo.component.Version; import com.yahoo.component.Vtag; +import com.yahoo.concurrent.DaemonThreadFactory; import com.yahoo.config.application.api.ApplicationFile; import com.yahoo.config.application.api.ApplicationMetaData; import com.yahoo.config.application.api.DeployLogger; @@ -384,7 +385,8 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye } void redeployAllApplications(Deployer deployer) throws InterruptedException { - ExecutorService deploymentExecutor = Executors.newFixedThreadPool(configserverConfig.numParallelTenantLoaders()); + ExecutorService deploymentExecutor = Executors.newFixedThreadPool(configserverConfig.numParallelTenantLoaders(), + new DaemonThreadFactory("redeploy apps")); tenants.getAllTenants().forEach(tenant -> listApplicationIds(tenant) .forEach(applicationId -> redeployApplication(applicationId, deployer, deploymentExecutor))); deploymentExecutor.shutdown(); diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java index 61145c2a138..0b2a620f92c 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java @@ -90,9 +90,8 @@ public class TenantBuilder { * Create a real tenant from the properties given by this builder. * * @return a new {@link Tenant} instance. - * @throws Exception if building fails */ - public Tenant build() throws Exception { + public Tenant build() { createTenantRequestHandler(); createApplicationRepo(); createRemoteSessionFactory(componentRegistry.getClock()); @@ -169,7 +168,7 @@ public class TenantBuilder { } } - private void createRemoteSessionRepo() throws Exception { + private void createRemoteSessionRepo() { if (remoteSessionRepo == null) { remoteSessionRepo = new RemoteSessionRepo(componentRegistry.getCurator(), remoteSessionFactory, -- cgit v1.2.3