diff options
author | Ola Aunrønning <olaa@oath.com> | 2018-11-12 14:21:10 +0100 |
---|---|---|
committer | Ola Aunrønning <olaa@oath.com> | 2018-11-12 14:21:10 +0100 |
commit | e63c0edfd15002a76d7203357883062bbb0ed9c8 (patch) | |
tree | a7738fa3145679fa950a7db989ad2577ff87f580 /controller-server | |
parent | ba32d454214d87d4293f5dabe7c9c6fd0d2e5d83 (diff) |
Print stacktrace of last exception. Remove logging of 0 qps deployments
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentMetricsMaintainer.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentMetricsMaintainer.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentMetricsMaintainer.java index 56dbe9212b7..c3474a485ca 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentMetricsMaintainer.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentMetricsMaintainer.java @@ -6,11 +6,9 @@ import com.yahoo.vespa.hosted.controller.Application; import com.yahoo.vespa.hosted.controller.ApplicationController; import com.yahoo.vespa.hosted.controller.Controller; import com.yahoo.vespa.hosted.controller.api.integration.MetricsService; -import com.yahoo.vespa.hosted.controller.application.ApplicationList; import com.yahoo.vespa.hosted.controller.application.Deployment; import com.yahoo.vespa.hosted.controller.application.DeploymentMetrics; import com.yahoo.vespa.hosted.controller.application.RotationStatus; -import com.yahoo.yolean.Exceptions; import java.time.Duration; import java.util.Collections; @@ -48,7 +46,6 @@ public class DeploymentMetricsMaintainer extends Maintainer { @Override protected void maintain() { AtomicInteger failures = new AtomicInteger(0); - AtomicInteger zeroQps = new AtomicInteger(0); AtomicReference<Exception> lastException = new AtomicReference<>(null); List<Application> applicationList = applications.asList(); @@ -66,9 +63,6 @@ public class DeploymentMetricsMaintainer extends Maintainer { for (Deployment deployment : application.deployments().values()) { MetricsService.DeploymentMetrics deploymentMetrics = controller().metricsService() .getDeploymentMetrics(application.id(), deployment.zone()); - if (deploymentMetrics.queriesPerSecond() < 0.0001) { - zeroQps.incrementAndGet(); - } DeploymentMetrics newMetrics = new DeploymentMetrics(deploymentMetrics.queriesPerSecond(), deploymentMetrics.writesPerSecond(), @@ -90,13 +84,12 @@ public class DeploymentMetricsMaintainer extends Maintainer { pool.shutdown(); try { pool.awaitTermination(30, TimeUnit.MINUTES); - log.log(Level.INFO, String.format("Number of application with 0 qps: %d/%d", zeroQps.get(), applicationList.size())); if (lastException.get() != null) { - log.log(Level.WARNING, String.format("Failed to query metrics service for %d/%d applications. Last error: %s. Retrying in %s", + log.log(Level.INFO, String.format("Failed to query metrics service for %d/%d applications. Retrying in %s. Last error: ", failures.get(), applicationList.size(), - Exceptions.toMessageString(lastException.get()), - maintenanceInterval())); + maintenanceInterval()), + lastException.get()); } } catch (InterruptedException e) { throw new RuntimeException(e); |