Class Dispatcher

java.lang.Object
com.yahoo.component.AbstractComponent
com.yahoo.search.dispatch.Dispatcher
All Implemented Interfaces:
com.yahoo.component.Component, com.yahoo.component.Deconstructable, Comparable<com.yahoo.component.Component>
Direct Known Subclasses:
ReconfigurableDispatcher

public class Dispatcher extends com.yahoo.component.AbstractComponent
A dispatcher communicates with search nodes to perform queries and fill hits.

This class allocates SearchInvoker and FillInvoker objects based on query properties and general system status. The caller can then use the provided invocation object to execute the search or fill.

This class is multithread safe.

Author:
bratseth, ollvir
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final com.yahoo.processing.request.CompoundName
    If set will control computation of how many hits will be fetched from each partition.

    Fields inherited from class com.yahoo.component.AbstractComponent

    isDeconstructable
  • Constructor Summary

    Constructors
    Constructor
    Description
    Dispatcher(com.yahoo.component.ComponentId clusterId, com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, com.yahoo.vespa.config.search.DispatchNodesConfig nodesConfig, com.yahoo.container.handler.VipStatus vipStatus)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
     
     
    getFillInvoker(Result result, VespaBackend searcher)
     
     

    Methods inherited from class com.yahoo.component.AbstractComponent

    clone, compareTo, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • DISPATCH

      public static final String DISPATCH
      See Also:
    • topKProbability

      public static final com.yahoo.processing.request.CompoundName topKProbability
      If set will control computation of how many hits will be fetched from each partition.
  • Constructor Details

    • Dispatcher

      @Inject public Dispatcher(com.yahoo.component.ComponentId clusterId, com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, com.yahoo.vespa.config.search.DispatchNodesConfig nodesConfig, com.yahoo.container.handler.VipStatus vipStatus)
  • Method Details

    • getArgumentType

      public static QueryProfileType getArgumentType()
    • allGroupsHaveSize1

      public boolean allGroupsHaveSize1()
    • deconstruct

      public void deconstruct()
      Specified by:
      deconstruct in interface com.yahoo.component.Deconstructable
      Overrides:
      deconstruct in class com.yahoo.component.AbstractComponent
    • getFillInvoker

      public FillInvoker getFillInvoker(Result result, VespaBackend searcher)
    • getSearchInvoker

      public SearchInvoker getSearchInvoker(Query query, VespaBackend searcher)