Class Coverage


  • public class Coverage
    extends java.lang.Object
    The coverage report for a result set.
    Author:
    Steinar Knutsen, baldersheim
    • 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
      • DEGRADED_BY_MATCH_PHASE

        public static final int DEGRADED_BY_MATCH_PHASE
        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()
        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()
        Total number of documents that could be searched.
        Returns:
        Total number of active documents
      • getSoonActive

        @Beta
        public long getSoonActive()
        Total number of documents that will be searchable once redistribution has settled. Still in beta, sematics not finalized yet.
        Returns:
        Total number of documents that will soon be available.
      • 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()