diff options
author | Valerij Fredriksen <valerijf@oath.com> | 2018-03-05 14:02:32 +0100 |
---|---|---|
committer | Valerij Fredriksen <valerijf@oath.com> | 2018-03-05 14:11:54 +0100 |
commit | 9cef59524d00e3d0af25a6c90db2225e16a18f7e (patch) | |
tree | b3f6821ec060711dfcd25dbd9a02d8868bbf6ef5 | |
parent | 2723c52a4c6165fc68e0e2f0996f45e619b62426 (diff) |
Write metrics schedules with retries
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java | 13 |
1 files changed, 6 insertions, 7 deletions
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 0dc03b13fc7..3822e73ffad 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 @@ -166,15 +166,15 @@ public class NodeAgentImpl implements NodeAgent { @Override public Map<String, Object> debugInfo() { Map<String, Object> debug = new LinkedHashMap<>(); - debug.put("Hostname", hostname); + debug.put("hostname", hostname); debug.put("isFrozen", isFrozen); debug.put("wantFrozen", wantFrozen); debug.put("terminated", terminated); debug.put("workToDoNow", workToDoNow); synchronized (debugMessages) { - debug.put("History", new LinkedList<>(debugMessages)); + debug.put("history", new LinkedList<>(debugMessages)); } - debug.put("Node repo state", lastNodeSpec.nodeState.name()); + debug.put("nodeRepoState", lastNodeSpec.nodeState.name()); return debug; } @@ -448,15 +448,14 @@ public class NodeAgentImpl implements NodeAgent { Optional<Container> container = getContainer(); if (!nodeSpec.equals(lastNodeSpec)) { - addDebugMessage("Loading new node spec: " + nodeSpec.toString()); - lastNodeSpec = nodeSpec; - // Every time the node spec changes, we should clear the metrics for this container as the dimensions // will change and we will be reporting duplicate metrics. - // TODO: Should be retried if writing fails if (container.isPresent()) { storageMaintainer.writeMetricsConfig(containerName, nodeSpec); } + + addDebugMessage("Loading new node spec: " + nodeSpec.toString()); + lastNodeSpec = nodeSpec; } switch (nodeSpec.nodeState) { |