diff options
author | valerijf <valerijf@yahoo-inc.com> | 2017-06-08 12:52:52 +0200 |
---|---|---|
committer | valerijf <valerijf@yahoo-inc.com> | 2017-06-08 12:52:52 +0200 |
commit | c5cd0da50846decdfab54f6409c4dd6bea77a469 (patch) | |
tree | e88394720a3fc46bac46bac0f2a90d5f78cd5890 /node-admin | |
parent | dd5cdbd23ff94f76bb924f217d320aaf88b8d8c4 (diff) |
Use scheduleWithFixedDelay instead of scheduleAtFixedRate
Diffstat (limited to 'node-admin')
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminImpl.java index 1171e81ab28..c6bc0f7bbbb 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminImpl.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminImpl.java @@ -69,7 +69,7 @@ public class NodeAdminImpl implements NodeAdmin { this.numberOfContainersInLoadImageState = metricReceiver.declareGauge(MetricReceiverWrapper.APPLICATION_DOCKER, dimensions, "nodes.image.loading"); this.numberOfUnhandledExceptionsInNodeAgent = metricReceiver.declareCounter(MetricReceiverWrapper.APPLICATION_DOCKER, dimensions, "nodes.unhandled_exceptions"); - metricsScheduler.scheduleAtFixedRate(() -> { + metricsScheduler.scheduleWithFixedDelay(() -> { try { nodeAgents.values().forEach(nodeAgent -> nodeAgent.updateContainerNodeMetrics(nodeAgents.size())); } catch (Throwable e) { @@ -77,7 +77,7 @@ public class NodeAdminImpl implements NodeAdmin { } }, 0, 30, TimeUnit.SECONDS); - aclMaintainer.ifPresent(maintainer -> aclScheduler.scheduleAtFixedRate(() -> { + aclMaintainer.ifPresent(maintainer -> aclScheduler.scheduleWithFixedDelay(() -> { if (!isFrozen()) maintainer.run(); }, 30, 60, TimeUnit.SECONDS)); } |