summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2018-10-05 11:45:27 +0200
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2018-10-05 11:45:27 +0200
commitf1eab23a3253838258249d8d422f11363927bdda (patch)
tree72164313f225388969e07458373d5b886f1bbd3f /controller-api
parentf3c2505a0c47f50a2e86264f8124329fcc6cd755 (diff)
Limit run data and logs to a history of the 256 last ones
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/RunDataStore.java3
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockRunDataStore.java5
2 files changed, 8 insertions, 0 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/RunDataStore.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/RunDataStore.java
index fe936b3a752..418d1089428 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/RunDataStore.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/RunDataStore.java
@@ -17,6 +17,9 @@ public interface RunDataStore {
/** Stores the given log for the given deployment job. */
void put(RunId id, byte[] log);
+ /** Deletes the run logs for the given deployment job. */
+ void delete(RunId id);
+
/** Deletes all data associated with the given application. */
void delete(ApplicationId id);
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockRunDataStore.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockRunDataStore.java
index 0d7d8eca10e..16874f996a5 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockRunDataStore.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockRunDataStore.java
@@ -27,6 +27,11 @@ public class MockRunDataStore implements RunDataStore {
}
@Override
+ public void delete(RunId id) {
+ logs.remove(id);
+ }
+
+ @Override
public void delete(ApplicationId id) {
logs.keySet().removeIf(runId -> runId.application().equals(id));
}