Package com.yahoo.search.dispatch
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>
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
Modifier and TypeFieldDescriptionstatic 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
ModifierConstructorDescriptionprotected
Dispatcher
(ClusterMonitor<Node> 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.container.handler.VipStatus vipStatus, com.yahoo.jdisc.Metric metric) -
Method Summary
Modifier and TypeMethodDescriptionvoid
static QueryProfileType
getFillInvoker
(Result result, VespaBackEndSearcher searcher) getSearchInvoker
(Query query, VespaBackEndSearcher searcher) Returns the search cluster this dispatches toMethods inherited from class com.yahoo.component.AbstractComponent
clone, compareTo, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString
-
Field Details
-
DISPATCH
- See Also:
-
topKProbability
public static final com.yahoo.processing.request.CompoundName topKProbabilityIf set will control computation of how many hits will be fetched from each partition.
-
-
Constructor Details
-
Dispatcher
@Inject public Dispatcher(RpcResourcePool resourcePool, com.yahoo.component.ComponentId clusterId, com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, com.yahoo.container.handler.VipStatus vipStatus, com.yahoo.jdisc.Metric metric) -
Dispatcher
protected Dispatcher(ClusterMonitor<Node> clusterMonitor, SearchCluster searchCluster, com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, InvokerFactory invokerFactory, com.yahoo.jdisc.Metric metric)
-
-
Method Details
-
getArgumentType
-
searchCluster
Returns the search cluster this dispatches to -
deconstruct
public void deconstruct()- Specified by:
deconstruct
in interfacecom.yahoo.component.Deconstructable
- Overrides:
deconstruct
in classcom.yahoo.component.AbstractComponent
-
getFillInvoker
-
getSearchInvoker
-