summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHarald Musum <musum@oath.com>2018-02-13 14:03:18 +0100
committerHarald Musum <musum@oath.com>2018-02-13 14:03:18 +0100
commitd4e6d4ec97f8b1b9df19e81fc143664cea5d2e82 (patch)
tree880261178691a117305a0713f3d1ae8887747585 /configserver
parent8daccb7a9396d1ffa5fffb9d7bba04e3f15aca8e (diff)
Give name to a few executor services
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java4
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java5
2 files changed, 5 insertions, 4 deletions
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,