summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-01-14 18:38:28 +0100
committerGitHub <noreply@github.com>2018-01-14 18:38:28 +0100
commit1ef4e5ff9f25a717f67e6ba6f34ffa4150fd20a8 (patch)
tree1cd82b1982b6c74dd2e4971f33c87a5ec13fc5b3
parent94cd2504ac85bf35ae13b72d135dea650879913e (diff)
parent643109abb6a2f7e8fe657d1c616700b2c27eeeff (diff)
Merge pull request #4654 from vespa-engine/musum/log-when-creating-tenants
Log before and after creating tenants
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/tenant/Tenants.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/Tenants.java b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/Tenants.java
index 5fb62a68e3e..daa2c88d287 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/Tenants.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/Tenants.java
@@ -74,10 +74,9 @@ public class Tenants implements ConnectionStateListener, PathChildrenCacheListen
* New instance from the tenants in the given component registry's ZooKeeper data.
*
* @param globalComponentRegistry a {@link com.yahoo.vespa.config.server.GlobalComponentRegistry}
- * @throws Exception is creating the Tenants instance fails
*/
@Inject
- public Tenants(GlobalComponentRegistry globalComponentRegistry) throws Exception {
+ public Tenants(GlobalComponentRegistry globalComponentRegistry) {
this.globalComponentRegistry = globalComponentRegistry;
this.curator = globalComponentRegistry.getCurator();
metricUpdater = globalComponentRegistry.getMetrics().getOrCreateMetricUpdater(Collections.emptyMap());
@@ -91,12 +90,14 @@ public class Tenants implements ConnectionStateListener, PathChildrenCacheListen
this.directoryCache = curator.createDirectoryCache(tenantsPath.getAbsolute(), false, false, pathChildrenExecutor);
directoryCache.start();
directoryCache.addListener(this);
+ log.log(LogLevel.INFO, "Creating all tenants"); // TODO: Change to debug
createTenants();
notifyTenantsLoaded();
+ log.log(LogLevel.INFO, "All tenants created"); // TODO: Change to debug
}
/**
- * New instance containing the given tenants. Creates no system tenants and noZookeeper watches. For testing only.
+ * New instance containing the given tenants. Creates no system tenants and no Zookeeper watches. For testing only.
* @param globalComponentRegistry a {@link com.yahoo.vespa.config.server.GlobalComponentRegistry} instance
* @param tenants a collection of {@link Tenant}s
*/
@@ -128,7 +129,7 @@ public class Tenants implements ConnectionStateListener, PathChildrenCacheListen
return tenants;
}
- public synchronized void addTenant(TenantName tenantName) throws Exception {
+ public synchronized void addTenant(TenantName tenantName) {
writeTenantPath(tenantName);
createTenant(tenantName);
}
@@ -318,7 +319,7 @@ public class Tenants implements ConnectionStateListener, PathChildrenCacheListen
}
@Override
- public void childEvent(CuratorFramework framework, PathChildrenCacheEvent event) throws Exception {
+ public void childEvent(CuratorFramework framework, PathChildrenCacheEvent event) {
switch (event.getType()) {
case CHILD_ADDED:
case CHILD_REMOVED: