java.lang.Object
com.yahoo.search.dispatch.searchcluster.Group

public class Group extends Object
A group in a search cluster. This class is multithread safe.
Author:
bratseth, ollivir
  • Constructor Details

    • Group

      public Group(int id, List<Node> nodes)
  • Method Details

    • id

      public int id()
      Returns the unique identity of this group. NOTE: This is a contiguous index from 0, NOT necessarily the group id assigned by the user or node repo.
    • nodes

      public List<Node> nodes()
      Returns the nodes in this group as an immutable list
    • hasSufficientCoverage

      public boolean hasSufficientCoverage()
      Returns whether this group has sufficient active documents (compared to other groups) that should receive traffic
    • workingNodes

      public int workingNodes()
    • aggregateNodeValues

      public void aggregateNodeValues()
    • isBlockingWrites

      public boolean isBlockingWrites()
      Returns whether any node in this group is currently blocking write operations
    • isBalanced

      public boolean isBalanced()
      Returns whether the nodes in the group have about the same number of documents
    • isSparse

      public boolean isSparse()
      Returns whether this group has too few documents per node to expect it to be balanced
    • fullCoverageStatusChanged

      public boolean fullCoverageStatusChanged(boolean hasFullCoverageNow)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object