diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-12-15 14:20:07 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-12-15 14:20:07 +0100 |
commit | 856220a1aa9d0c62ce3b466b5d05babf8caf1076 (patch) | |
tree | 17e6dcd902987eb89a56454aaa3b721b47c45228 /controller-api | |
parent | d4605ae7d977fe57cc66991035d63c7dfe4a33d0 (diff) |
Wire speed through controller
Diffstat (limited to 'controller-api')
2 files changed, 10 insertions, 11 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ApplicationReindexing.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ApplicationReindexing.java index 869fe9d04b5..305cd4c802e 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ApplicationReindexing.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ApplicationReindexing.java @@ -103,18 +103,20 @@ public class ApplicationReindexing { private final State state; private final String message; private final Double progress; + private final Double speed; - public Status(Instant readyAt, Instant startedAt, Instant endedAt, State state, String message, Double progress) { + public Status(Instant readyAt, Instant startedAt, Instant endedAt, State state, String message, Double progress, Double speed) { this.readyAt = readyAt; this.startedAt = startedAt; this.endedAt = endedAt; this.state = state; this.message = message; this.progress = progress; + this.speed = speed; } public Status(Instant readyAt) { - this(readyAt, null, null, null, null, null); + this(readyAt, null, null, null, null, null, 1.0); } public Optional<Instant> readyAt() { return Optional.ofNullable(readyAt); } @@ -123,23 +125,19 @@ public class ApplicationReindexing { public Optional<State> state() { return Optional.ofNullable(state); } public Optional<String> message() { return Optional.ofNullable(message); } public Optional<Double> progress() { return Optional.ofNullable(progress); } + public Optional<Double> speed() { return Optional.ofNullable(speed); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Status status = (Status) o; - return Objects.equals(readyAt, status.readyAt) && - Objects.equals(startedAt, status.startedAt) && - Objects.equals(endedAt, status.endedAt) && - state == status.state && - Objects.equals(message, status.message) && - Objects.equals(progress, status.progress); + return Objects.equals(readyAt, status.readyAt) && Objects.equals(startedAt, status.startedAt) && Objects.equals(endedAt, status.endedAt) && state == status.state && Objects.equals(message, status.message) && Objects.equals(progress, status.progress) && Objects.equals(speed, status.speed); } @Override public int hashCode() { - return Objects.hash(readyAt, startedAt, endedAt, state, message, progress); + return Objects.hash(readyAt, startedAt, endedAt, state, message, progress, speed); } @Override @@ -150,7 +148,8 @@ public class ApplicationReindexing { ", endedAt=" + endedAt + ", state=" + state + ", message='" + message + '\'' + - ", progress='" + progress + '\'' + + ", progress=" + progress + + ", speed=" + speed + '}'; } diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java index 7f9b693f413..b9b7881745a 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java @@ -36,7 +36,7 @@ public interface ConfigServer { PreparedApplication deploy(DeploymentData deployment); - void reindex(DeploymentId deployment, List<String> clusterNames, List<String> documentTypes, boolean indexedOnly); + void reindex(DeploymentId deployment, List<String> clusterNames, List<String> documentTypes, boolean indexedOnly, Double speed); ApplicationReindexing getReindexing(DeploymentId deployment); |