Class Dispatcher

  • All Implemented Interfaces:
    com.yahoo.component.Component, java.lang.Comparable<com.yahoo.component.Component>

    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 java.lang.String DISPATCH  
      static com.yahoo.processing.request.CompoundName dispatchProtobuf
      If enabled, search queries will use protobuf rpc
      static com.yahoo.processing.request.CompoundName topKProbability
      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 
      Modifier Constructor Description
      protected Dispatcher​(ClusterMonitor clusterMonitor, SearchCluster searchCluster, com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, InvokerFactory invokerFactory, com.yahoo.jdisc.Metric metric)  
        Dispatcher​(RpcResourcePool resourcePool, com.yahoo.component.ComponentId clusterId, com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, com.yahoo.cloud.config.ClusterInfoConfig clusterInfoConfig, com.yahoo.container.handler.VipStatus vipStatus, com.yahoo.jdisc.Metric metric)  
    • Field Detail

      • dispatchProtobuf

        public static final com.yahoo.processing.request.CompoundName dispatchProtobuf
        If enabled, search queries will use protobuf rpc
      • 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 Detail

      • Dispatcher

        @Inject
        public Dispatcher​(RpcResourcePool resourcePool,
                          com.yahoo.component.ComponentId clusterId,
                          com.yahoo.vespa.config.search.DispatchConfig dispatchConfig,
                          com.yahoo.cloud.config.ClusterInfoConfig clusterInfoConfig,
                          com.yahoo.container.handler.VipStatus vipStatus,
                          com.yahoo.jdisc.Metric metric)
      • Dispatcher

        protected Dispatcher​(ClusterMonitor clusterMonitor,
                             SearchCluster searchCluster,
                             com.yahoo.vespa.config.search.DispatchConfig dispatchConfig,
                             InvokerFactory invokerFactory,
                             com.yahoo.jdisc.Metric metric)