summaryrefslogtreecommitdiffstats
path: root/node-admin/src
diff options
context:
space:
mode:
authorvalerijf <valerijf@yahoo-inc.com>2017-04-04 14:57:58 +0200
committervalerijf <valerijf@yahoo-inc.com>2017-04-04 14:57:58 +0200
commitd138fbcda9d279336cc3a1b39ff461dc9523af6e (patch)
treebf2d4bbb6b68dbad42b8f6e97b21cb105b8991b1 /node-admin/src
parentedd8622348ed6799b47eb318117002aa88878fcd (diff)
Renamed values, no functional changes
Diffstat (limited to 'node-admin/src')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminImpl.java3
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java14
2 files changed, 9 insertions, 8 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 4748670a4be..cc953ae729b 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
@@ -105,7 +105,7 @@ public class NodeAdminImpl implements NodeAdmin {
@Override
public boolean setFrozen(boolean wantFrozen) {
- // Use filter with count instead of allMatch() because allMatch() will short curcuit on first non-match
+ // Use filter with count instead of allMatch() because allMatch() will short circuit on first non-match
boolean allNodeAgentsConverged = nodeAgents.values().stream()
.filter(nodeAgent -> !nodeAgent.setFrozen(wantFrozen))
.count() == 0;
@@ -129,6 +129,7 @@ public class NodeAdminImpl implements NodeAdmin {
.forEach(NodeAgent::stopServices);
}
+ @Override
public Set<String> getListOfHosts() {
return nodeAgents.keySet();
}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
index 883c3e8d0a4..8128bb47eac 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
@@ -54,8 +54,8 @@ public class NodeAgentImpl implements NodeAgent {
private final PrefixLogger logger;
private DockerImage imageBeingDownloaded = null;
- private final String hostname;
+ private final String hostname;
private final ContainerName containerName;
private final NodeRepository nodeRepository;
private final Orchestrator orchestrator;
@@ -69,9 +69,9 @@ public class NodeAgentImpl implements NodeAgent {
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private final LinkedList<String> debugMessages = new LinkedList<>();
- private long delaysBetweenEachTickMillis = 30_000;
+ private long delaysBetweenEachConvergeMillis = 30_000;
private int numberOfUnhandledException = 0;
- private Instant lastTick;
+ private Instant lastConverge;
private Thread loopThread;
@@ -109,7 +109,7 @@ public class NodeAgentImpl implements NodeAgent {
this.environment = environment;
this.clock = clock;
this.aclMaintainer = aclMaintainer;
- this.lastTick = clock.instant();
+ this.lastConverge = clock.instant();
// If the container is already running, initialize vespaVersion and lastCpuMetric
lastCpuMetric = new CpuUsageReporter(clock.instant());
@@ -165,7 +165,7 @@ public class NodeAgentImpl implements NodeAgent {
@Override
public void start(int intervalMillis) {
addDebugMessage("Starting with interval " + intervalMillis + "ms");
- delaysBetweenEachTickMillis = intervalMillis;
+ delaysBetweenEachConvergeMillis = intervalMillis;
if (loopThread != null) {
throw new RuntimeException("Can not restart a node agent.");
}
@@ -374,7 +374,7 @@ public class NodeAgentImpl implements NodeAgent {
boolean isFrozenCopy;
synchronized (monitor) {
while (! workToDoNow) {
- long remainder = delaysBetweenEachTickMillis - Duration.between(lastTick, clock.instant()).toMillis();
+ long remainder = delaysBetweenEachConvergeMillis - Duration.between(lastConverge, clock.instant()).toMillis();
if (remainder > 0) {
try {
monitor.wait(remainder);
@@ -383,7 +383,7 @@ public class NodeAgentImpl implements NodeAgent {
}
} else break;
}
- lastTick = clock.instant();
+ lastConverge = clock.instant();
workToDoNow = false;
if (isFrozen != wantFrozen) {