Class ClusterRebalanceAllocationDecider
- java.lang.Object
-
- org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
-
- org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider
-
public class ClusterRebalanceAllocationDecider extends AllocationDecider
ThisAllocationDecider
controls re-balancing operations based on the cluster wide active shard state. This decided can not be configured in real-time and should be pre-cluster start viacluster.routing.allocation.allow_rebalance
. This setting respects the following values:indices_primaries_active
- Re-balancing is allowed only once all primary shards on all indices are active.indices_all_active
- Re-balancing is allowed only once all shards on all indices are active.always
- Re-balancing is allowed once a shard replication group is active
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClusterRebalanceAllocationDecider.ClusterRebalanceType
An enum representation for the configured re-balance type.
-
Field Summary
Fields Modifier and Type Field Description static Setting<ClusterRebalanceAllocationDecider.ClusterRebalanceType>
CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING
static java.lang.String
NAME
-
Constructor Summary
Constructors Constructor Description ClusterRebalanceAllocationDecider(Settings settings, ClusterSettings clusterSettings)
-
Method Summary
Modifier and Type Method Description Decision
canRebalance(RoutingAllocation allocation)
Returns aDecision
whether the cluster can execute re-balanced operations at all.Decision
canRebalance(ShardRouting shardRouting, RoutingAllocation allocation)
Returns aDecision
whether the given shard routing can be re-balanced to the given allocation.-
Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
canAllocate, canAllocate, canAllocate, canAllocate, canForceAllocatePrimary, canRemain
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING
public static final Setting<ClusterRebalanceAllocationDecider.ClusterRebalanceType> CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING
-
-
Constructor Detail
-
ClusterRebalanceAllocationDecider
public ClusterRebalanceAllocationDecider(Settings settings, ClusterSettings clusterSettings)
-
-
Method Detail
-
canRebalance
public Decision canRebalance(ShardRouting shardRouting, RoutingAllocation allocation)
Description copied from class:AllocationDecider
Returns aDecision
whether the given shard routing can be re-balanced to the given allocation. The default isDecision.ALWAYS
.- Overrides:
canRebalance
in classAllocationDecider
-
canRebalance
public Decision canRebalance(RoutingAllocation allocation)
Description copied from class:AllocationDecider
Returns aDecision
whether the cluster can execute re-balanced operations at all.Decision.ALWAYS
.- Overrides:
canRebalance
in classAllocationDecider
-
-