summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2021-01-15 14:39:20 +0100
committerGitHub <noreply@github.com>2021-01-15 14:39:20 +0100
commit03801fa884fd8e3f351de2364526cc3170fb5a38 (patch)
tree1eeaeb1da08a10d2e95a309821a783e688e456af /controller-api
parent67eb281db24723ce60e8f830614d564e2b29462c (diff)
parent3f6247f7d7c29d181282fb381106fb5e34ed8089 (diff)
Merge pull request #16056 from vespa-engine/jonmv/reindex-only-documents-with-real-indexing
Jonmv/reindex only documents with real indexing
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ApplicationReindexing.java28
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java2
2 files changed, 6 insertions, 24 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 e143cdd6d9e..f94a91dc0c6 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
@@ -6,8 +6,6 @@ import java.util.Map;
import java.util.Objects;
import java.util.Optional;
-import static java.util.Objects.requireNonNull;
-
/**
* Reindexing status for a single Vespa application.
*
@@ -16,12 +14,10 @@ import static java.util.Objects.requireNonNull;
public class ApplicationReindexing {
private final boolean enabled;
- private final Status common;
private final Map<String, Cluster> clusters;
- public ApplicationReindexing(boolean enabled, Status common, Map<String, Cluster> clusters) {
+ public ApplicationReindexing(boolean enabled, Map<String, Cluster> clusters) {
this.enabled = enabled;
- this.common = requireNonNull(common);
this.clusters = Map.copyOf(clusters);
}
@@ -29,10 +25,6 @@ public class ApplicationReindexing {
return enabled;
}
- public Status common() {
- return common;
- }
-
public Map<String, Cluster> clusters() {
return clusters;
}
@@ -43,20 +35,18 @@ public class ApplicationReindexing {
if (o == null || getClass() != o.getClass()) return false;
ApplicationReindexing that = (ApplicationReindexing) o;
return enabled == that.enabled &&
- common.equals(that.common) &&
clusters.equals(that.clusters);
}
@Override
public int hashCode() {
- return Objects.hash(enabled, common, clusters);
+ return Objects.hash(enabled, clusters);
}
@Override
public String toString() {
return "ApplicationReindexing{" +
"enabled=" + enabled +
- ", common=" + common +
", clusters=" + clusters +
'}';
}
@@ -64,20 +54,14 @@ public class ApplicationReindexing {
public static class Cluster {
- private final Optional<Status> common;
private final Map<String, Long> pending;
private final Map<String, Status> ready;
- public Cluster(Status common, Map<String, Long> pending, Map<String, Status> ready) {
- this.common = Optional.ofNullable(common);
+ public Cluster(Map<String, Long> pending, Map<String, Status> ready) {
this.pending = Map.copyOf(pending);
this.ready = Map.copyOf(ready);
}
- public Optional<Status> common() {
- return common;
- }
-
public Map<String, Long> pending() {
return pending;
}
@@ -91,20 +75,18 @@ public class ApplicationReindexing {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Cluster cluster = (Cluster) o;
- return common.equals(cluster.common) &&
- pending.equals(cluster.pending) &&
+ return pending.equals(cluster.pending) &&
ready.equals(cluster.ready);
}
@Override
public int hashCode() {
- return Objects.hash(common, pending, ready);
+ return Objects.hash(pending, ready);
}
@Override
public String toString() {
return "Cluster{" +
- "common=" + common +
", pending=" + pending +
", ready=" + ready +
'}';
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 11940b30ac1..a90155d4e3e 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
@@ -35,7 +35,7 @@ public interface ConfigServer {
PreparedApplication deploy(DeploymentData deployment);
- void reindex(DeploymentId deployment, List<String> clusterNames, List<String> documentTypes);
+ void reindex(DeploymentId deployment, List<String> clusterNames, List<String> documentTypes, boolean indexedOnly);
Optional<ApplicationReindexing> getReindexing(DeploymentId deployment);