@Beta
public class Dispatcher
extends com.yahoo.component.AbstractComponent
Modifier and Type | Class and Description |
---|---|
static class |
Dispatcher.GetDocsumsResponseReceiver
Receiver of the responses to a set of getDocsums requests
|
Modifier and Type | Field and Description |
---|---|
private Client |
client |
private com.yahoo.compress.Compressor |
compressor |
private static Logger |
log |
private com.google.common.collect.ImmutableMap<Integer,Client.NodeConnection> |
nodeConnections
Connections to the search nodes this talks to, indexed by node id ("partid")
|
private SearchCluster |
searchCluster
A model of the search cluster this dispatches to
|
Constructor and Description |
---|
Dispatcher(com.yahoo.vespa.config.search.DispatchConfig dispatchConfig,
FS4ResourcePool fs4ResourcePool,
int containerClusterSize,
com.yahoo.container.handler.VipStatus vipStatus) |
Dispatcher(Map<Integer,Client.NodeConnection> nodeConnections,
Client client)
For testing
|
Modifier and Type | Method and Description |
---|---|
void |
deconstruct() |
void |
fill(Result result,
String summaryClass,
com.yahoo.compress.CompressionType compression)
Fills the given summary class by sending RPC requests to the right search nodes
|
private static com.yahoo.collections.ListMap<Integer,FastHit> |
hitsByNode(Result result)
Return a map of hits by their search node (partition) id
|
SearchCluster |
searchCluster()
Returns the search cluster this dispatches to
|
private void |
sendGetDocsumsRequest(int nodeId,
List<FastHit> hits,
String summaryClass,
com.yahoo.compress.CompressionType compression,
Result result,
Dispatcher.GetDocsumsResponseReceiver responseReceiver)
Send a getDocsums request to a node.
|
private static com.yahoo.slime.Slime |
toSlime(String rankProfile,
String summaryClass,
String docType,
SessionId sessionId,
List<FastHit> hits) |
private static final Logger log
private final Client client
private final SearchCluster searchCluster
private final com.google.common.collect.ImmutableMap<Integer,Client.NodeConnection> nodeConnections
private final com.yahoo.compress.Compressor compressor
public Dispatcher(com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, FS4ResourcePool fs4ResourcePool, int containerClusterSize, com.yahoo.container.handler.VipStatus vipStatus)
public Dispatcher(Map<Integer,Client.NodeConnection> nodeConnections, Client client)
public SearchCluster searchCluster()
public void fill(Result result, String summaryClass, com.yahoo.compress.CompressionType compression)
private static com.yahoo.collections.ListMap<Integer,FastHit> hitsByNode(Result result)
private void sendGetDocsumsRequest(int nodeId, List<FastHit> hits, String summaryClass, com.yahoo.compress.CompressionType compression, Result result, Dispatcher.GetDocsumsResponseReceiver responseReceiver)
private static com.yahoo.slime.Slime toSlime(String rankProfile, String summaryClass, String docType, SessionId sessionId, List<FastHit> hits)
public void deconstruct()
deconstruct
in class com.yahoo.component.AbstractComponent
Copyright © 2018. All rights reserved.