public class SearchCluster extends Object implements NodeManager<SearchCluster.Node>
Modifier and Type | Class and Description |
---|---|
static class |
SearchCluster.Group
A group in a search cluster.
|
static class |
SearchCluster.Node
A node in a search cluster.
|
Constructor and Description |
---|
SearchCluster(com.yahoo.vespa.config.search.DispatchConfig dispatchConfig,
FS4ResourcePool fs4ResourcePool,
int containerClusterSize,
com.yahoo.container.handler.VipStatus vipStatus) |
SearchCluster(double minActivedocsCoverage,
List<SearchCluster.Node> nodes,
FS4ResourcePool fs4ResourcePool,
int containerClusterSize,
com.yahoo.container.handler.VipStatus vipStatus) |
Modifier and Type | Method and Description |
---|---|
Optional<SearchCluster.Node> |
directDispatchTarget()
Returns the recipient we should dispatch queries directly to (bypassing fdispatch),
or empty if we should not dispatch directly.
|
void |
failed(SearchCluster.Node node)
Used by the cluster monitor to manage node status
|
com.google.common.collect.ImmutableMap<Integer,SearchCluster.Group> |
groups()
Returns the groups of this cluster as an immutable map indexed by group id
|
int |
groupSize()
Returns the number of nodes per group - size()/groups.size()
|
com.google.common.collect.ImmutableMultimap<String,SearchCluster.Node> |
nodesByHost()
Returns the nodes of this cluster as an immutable map indexed by host.
|
void |
ping(SearchCluster.Node node,
Executor executor)
Used by the cluster monitor to manage node status
|
void |
pingIterationCompleted()
Update statistics after a round of issuing pings.
|
int |
size()
Returns the number of nodes in this cluster (across all groups)
|
void |
working(SearchCluster.Node node)
Used by the cluster monitor to manage node status
|
public SearchCluster(com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, FS4ResourcePool fs4ResourcePool, int containerClusterSize, com.yahoo.container.handler.VipStatus vipStatus)
public SearchCluster(double minActivedocsCoverage, List<SearchCluster.Node> nodes, FS4ResourcePool fs4ResourcePool, int containerClusterSize, com.yahoo.container.handler.VipStatus vipStatus)
public int size()
public com.google.common.collect.ImmutableMap<Integer,SearchCluster.Group> groups()
public int groupSize()
public com.google.common.collect.ImmutableMultimap<String,SearchCluster.Node> nodesByHost()
public Optional<SearchCluster.Node> directDispatchTarget()
public void working(SearchCluster.Node node)
working
in interface NodeManager<SearchCluster.Node>
public void failed(SearchCluster.Node node)
failed
in interface NodeManager<SearchCluster.Node>
public void ping(SearchCluster.Node node, Executor executor)
ping
in interface NodeManager<SearchCluster.Node>
public void pingIterationCompleted()
pingIterationCompleted
in interface NodeManager<SearchCluster.Node>
Copyright © 2018. All rights reserved.