Package com.yahoo.container.handler
Class Coverage
- java.lang.Object
-
- com.yahoo.container.handler.Coverage
-
public class Coverage extends java.lang.Object
The coverage report for a result set.- Author:
- Steinar Knutsen, baldersheim
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Coverage.FullCoverageDefinition
-
Field Summary
Fields Modifier and Type Field Description protected long
active
static int
DEGRADED_BY_ADAPTIVE_TIMEOUT
static int
DEGRADED_BY_MATCH_PHASE
static int
DEGRADED_BY_TIMEOUT
protected int
degradedReason
protected long
docs
protected Coverage.FullCoverageDefinition
fullReason
protected int
fullResultSets
protected int
nodes
protected int
resultSets
protected long
soonActive
-
Constructor Summary
Constructors Modifier Constructor Description protected
Coverage()
Build an invalid instance to initiate manually.Coverage(long docs, int nodes, boolean full)
protected
Coverage(long docs, int nodes, boolean full, int resultSets)
protected
Coverage(long docs, long active, int nodes, int resultSets)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getActive()
Returns the total number of documents that could be searched.long
getDocs()
Returns the number of documents searched for this result.boolean
getFull()
Returns whether the search had full coverage or notint
getFullResultSets()
A Coverage instance contains coverage information for potentially more than one search.int
getNodes()
Returns the number of search instances which participated successfully in the search.int
getNodesTried()
Returns the number of search instances which tried to participate in the search.int
getResultPercentage()
An int between 0 (inclusive) and 100 (inclusive) representing how many percent coverage the result sets this Coverage instance contains information about had.int
getResultSets()
A Coverage instance contains coverage information for potentially more than one search.long
getSoonActive()
Returns the total number of documents that will be searchable once redistribution has settled.boolean
isDegraded()
boolean
isDegradedByAdapativeTimeout()
boolean
isDegradedByMatchPhase()
boolean
isDegradedByNonIdealState()
boolean
isDegradedByTimeout()
void
merge(Coverage other)
Coverage
setNodesTried(int nodesTried)
com.yahoo.container.logging.Coverage
toLoggingCoverage()
-
-
-
Field Detail
-
docs
protected long docs
-
active
protected long active
-
soonActive
protected long soonActive
-
degradedReason
protected int degradedReason
-
nodes
protected int nodes
-
resultSets
protected int resultSets
-
fullResultSets
protected int fullResultSets
-
fullReason
protected Coverage.FullCoverageDefinition fullReason
-
DEGRADED_BY_MATCH_PHASE
public static final int DEGRADED_BY_MATCH_PHASE
- See Also:
- Constant Field Values
-
DEGRADED_BY_TIMEOUT
public static final int DEGRADED_BY_TIMEOUT
- See Also:
- Constant Field Values
-
DEGRADED_BY_ADAPTIVE_TIMEOUT
public static final int DEGRADED_BY_ADAPTIVE_TIMEOUT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Coverage
protected Coverage()
Build an invalid instance to initiate manually.
-
Coverage
protected Coverage(long docs, long active, int nodes, int resultSets)
-
Coverage
public Coverage(long docs, int nodes, boolean full)
-
Coverage
protected Coverage(long docs, int nodes, boolean full, int resultSets)
-
-
Method Detail
-
merge
public void merge(Coverage other)
-
getDocs
public long getDocs()
Returns the number of documents searched for this result. If the final result set is produced through several queries, this number will be the sum for all the queries.
-
getActive
public long getActive()
Returns the total number of documents that could be searched.
-
getSoonActive
@Beta public long getSoonActive()
Returns the total number of documents that will be searchable once redistribution has settled. Still in beta, semantics not finalized yet.
-
isDegraded
public boolean isDegraded()
-
isDegradedByMatchPhase
public boolean isDegradedByMatchPhase()
-
isDegradedByTimeout
public boolean isDegradedByTimeout()
-
isDegradedByAdapativeTimeout
public boolean isDegradedByAdapativeTimeout()
-
isDegradedByNonIdealState
public boolean isDegradedByNonIdealState()
-
getFull
public boolean getFull()
Returns whether the search had full coverage or not
-
getNodes
public int getNodes()
Returns the number of search instances which participated successfully in the search.
-
getNodesTried
public int getNodesTried()
Returns the number of search instances which tried to participate in the search.
-
setNodesTried
public Coverage setNodesTried(int nodesTried)
-
getFullResultSets
public int getFullResultSets()
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 many of the result sets for these queries had full coverage.- Returns:
- the number of result sets which had full coverage
-
getResultSets
public int getResultSets()
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 many result sets containing coverage information this Coverage instance contains information about.- Returns:
- the number of result sets with coverage information for this instance
-
getResultPercentage
public int getResultPercentage()
An int between 0 (inclusive) and 100 (inclusive) representing how many percent coverage the result sets this Coverage instance contains information about had.
-
toLoggingCoverage
public com.yahoo.container.logging.Coverage toLoggingCoverage()
-
-