aboutsummaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-02-06 23:59:48 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2018-02-06 23:59:48 +0100
commit553575a45c8697b247036c5a4a6b2e9e9fb862ee (patch)
tree195fb7c422aebb78c1affd2eb343e43faec8ab1e /container-core
parent621769aa5563ff9e6cdae89b487fc7a68b878c15 (diff)
Propagate nodes too.
Diffstat (limited to 'container-core')
-rw-r--r--container-core/src/main/java/com/yahoo/container/handler/Coverage.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/handler/Coverage.java b/container-core/src/main/java/com/yahoo/container/handler/Coverage.java
index 9f63ff6e68c..481e3f5ba97 100644
--- a/container-core/src/main/java/com/yahoo/container/handler/Coverage.java
+++ b/container-core/src/main/java/com/yahoo/container/handler/Coverage.java
@@ -17,6 +17,7 @@ public class Coverage {
protected long soonActive;
protected int degradedReason;
protected int nodes;
+ private int nodesTried;
protected int resultSets;
protected int fullResultSets;
@@ -34,8 +35,7 @@ public class Coverage {
/**
* Build an invalid instance to initiate manually.
*/
- protected Coverage() {
- }
+ protected Coverage() { }
protected Coverage(long docs, long active, int nodes, int resultSets) {
this(docs, active, nodes, resultSets, FullCoverageDefinition.DOCUMENT_COUNT);
@@ -53,6 +53,7 @@ public class Coverage {
private Coverage(long docs, long active, int nodes, int resultSets, FullCoverageDefinition fullReason) {
this.docs = docs;
this.nodes = nodes;
+ this.nodesTried = nodes;
this.active = active;
this.soonActive = active;
this.degradedReason = 0;
@@ -67,6 +68,7 @@ public class Coverage {
}
docs += other.getDocs();
nodes += other.getNodes();
+ nodesTried += other.nodesTried;
active += other.getActive();
soonActive += other.getSoonActive();
degradedReason |= other.degradedReason;
@@ -137,13 +139,22 @@ public class Coverage {
}
/**
- * @return the number of search instances which participated in the search.
+ * @return the number of search instances which participated successfully in the search.
*/
public int getNodes() {
return nodes;
}
/**
+ * @return the number of search instances which tried to participate in the search.
+ */
+ public int getNodesTried() {
+ return nodesTried;
+ }
+
+ public Coverage setNodesTried(int nodesTried) { this.nodesTried = nodesTried; return this; }
+
+ /**
* A Coverage instance contains coverage information for potentially more
* than one search. If several queries, e.g. through blending of results
* from multiple clusters, produced a result set, this number will show how