public class SearchCluster extends Object implements NodeManager<Node>
Constructor and Description |
---|
SearchCluster(com.yahoo.vespa.config.search.DispatchConfig dispatchConfig,
FS4ResourcePool fs4ResourcePool,
int containerClusterSize,
com.yahoo.container.handler.VipStatus vipStatus) |
SearchCluster(double minActivedocsCoverage,
double minGroupCoverage,
int maxNodesDownPerGroup,
List<Node> nodes,
FS4ResourcePool fs4ResourcePool,
int containerClusterSize,
com.yahoo.container.handler.VipStatus vipStatus) |
Modifier and Type | Method and Description |
---|---|
Optional<Node> |
directDispatchTarget()
Returns the recipient we should dispatch queries directly to (bypassing fdispatch),
or empty if we should not dispatch directly.
|
void |
failed(Node node)
Used by the cluster monitor to manage node status
|
Optional<Group> |
group(int n)
Returns the n'th (zero-indexed) group in the cluster if possible
|
com.google.common.collect.ImmutableMap<Integer,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()
|
boolean |
isPartialGroupCoverageSufficient(int groupId,
List<Node> nodes)
Calculate whether a subset of nodes in a group has enough coverage
|
com.google.common.collect.ImmutableMultimap<String,Node> |
nodesByHost()
Returns the nodes of this cluster as an immutable map indexed by host.
|
com.google.common.collect.ImmutableList<Group> |
orderedGroups()
Returns the groups of this cluster as an immutable list in introduction order
|
void |
ping(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(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, double minGroupCoverage, int maxNodesDownPerGroup, List<Node> nodes, FS4ResourcePool fs4ResourcePool, int containerClusterSize, com.yahoo.container.handler.VipStatus vipStatus)
public int size()
public com.google.common.collect.ImmutableMap<Integer,Group> groups()
public com.google.common.collect.ImmutableList<Group> orderedGroups()
public Optional<Group> group(int n)
public int groupSize()
public com.google.common.collect.ImmutableMultimap<String,Node> nodesByHost()
public Optional<Node> directDispatchTarget()
public void working(Node node)
working
in interface NodeManager<Node>
public void failed(Node node)
failed
in interface NodeManager<Node>
public void ping(Node node, Executor executor)
ping
in interface NodeManager<Node>
public void pingIterationCompleted()
pingIterationCompleted
in interface NodeManager<Node>
Copyright © 2018. All rights reserved.