diff options
author | Harald Musum <musum@oath.com> | 2018-01-14 17:24:34 +0100 |
---|---|---|
committer | Harald Musum <musum@oath.com> | 2018-01-14 17:24:34 +0100 |
commit | 643109abb6a2f7e8fe657d1c616700b2c27eeeff (patch) | |
tree | 2c69a529aeda0a4ca2c86df782862823eeb546e0 /configserver | |
parent | 289c6630ede5c36871884193afda61fd91e69398 (diff) |
Log when before and after creating tenants
Diffstat (limited to 'configserver')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/tenant/Tenants.java | 11 |
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: |