public class RoutingAllocation extends Object
RoutingAllocation
keep the state of the current allocation
of shards and holds the AllocationDeciders
which are responsible
for the current routing state.Modifier and Type | Class and Description |
---|---|
static class |
RoutingAllocation.Result
this class is used to describe results of a
RoutingAllocation |
Constructor and Description |
---|
RoutingAllocation(AllocationDeciders deciders,
RoutingNodes routingNodes,
DiscoveryNodes nodes,
ClusterInfo clusterInfo)
Creates a new
RoutingAllocation |
Modifier and Type | Method and Description |
---|---|
void |
addIgnoreShardForNode(ShardId shardId,
String nodeId) |
ClusterInfo |
clusterInfo() |
boolean |
debugDecision() |
void |
debugDecision(boolean debug) |
AllocationDeciders |
deciders()
Get
AllocationDeciders used for allocation |
Decision |
decision(Decision decision,
String deciderLabel,
String reason,
Object... params)
Create a routing decision, including the reason if the debug flag is
turned on
|
AllocationExplanation |
explanation()
Get explanations of current routing
|
boolean |
ignoreDisable() |
void |
ignoreDisable(boolean ignoreDisable) |
MetaData |
metaData()
Get metadata of routing nodes
|
DiscoveryNodes |
nodes()
Get discovery nodes in current routing
|
RoutingNodes |
routingNodes()
Get current routing nodes
|
RoutingTable |
routingTable()
Get routing table of current nodes
|
boolean |
shouldIgnoreShardForNode(ShardId shardId,
String nodeId) |
public RoutingAllocation(AllocationDeciders deciders, RoutingNodes routingNodes, DiscoveryNodes nodes, ClusterInfo clusterInfo)
RoutingAllocation
deciders
- AllocationDeciders
to used to make decisions for routing allocationsroutingNodes
- Routing nodes in the current clusternodes
- TODO: Documentationpublic AllocationDeciders deciders()
AllocationDeciders
used for allocationAllocationDeciders
used for allocationpublic RoutingTable routingTable()
public RoutingNodes routingNodes()
public MetaData metaData()
public DiscoveryNodes nodes()
public ClusterInfo clusterInfo()
public AllocationExplanation explanation()
public void ignoreDisable(boolean ignoreDisable)
public boolean ignoreDisable()
public void debugDecision(boolean debug)
public boolean debugDecision()
public Decision decision(Decision decision, String deciderLabel, String reason, Object... params)
decision
- decision whether to allow/deny allocationdeciderLabel
- a human readable label for the AllocationDeciderreason
- a format string explanation of the decisionparams
- format string parametersCopyright © 2009–2015. All rights reserved.