public class ClusterRebalanceAllocationDecider extends AllocationDecider
AllocationDecider 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 via
cluster.routing.allocation.allow_rebalance. This setting respects the following
values:
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ClusterRebalanceAllocationDecider.ClusterRebalanceType |
An enum representation for the configured re-balance type.
|
| Modifier and Type | Field | Description |
|---|---|---|
static Setting<ClusterRebalanceAllocationDecider.ClusterRebalanceType> |
CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING |
|
static java.lang.String |
NAME |
deprecationLogger, logger, settings| Constructor | Description |
|---|---|
ClusterRebalanceAllocationDecider(Settings settings,
ClusterSettings clusterSettings) |
| Modifier and Type | Method | Description |
|---|---|---|
Decision |
canRebalance(RoutingAllocation allocation) |
Returns a
Decision whether the cluster can execute
re-balanced operations at all. |
Decision |
canRebalance(ShardRouting shardRouting,
RoutingAllocation allocation) |
Returns a
Decision whether the given shard routing can be
re-balanced to the given allocation. |
logDeprecatedSetting, logRemovedSetting, nodeNamecanAllocate, canAllocate, canAllocate, canAllocate, canForceAllocatePrimary, canRemainpublic static final java.lang.String NAME
public static final Setting<ClusterRebalanceAllocationDecider.ClusterRebalanceType> CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING
public ClusterRebalanceAllocationDecider(Settings settings, ClusterSettings clusterSettings)
public Decision canRebalance(ShardRouting shardRouting, RoutingAllocation allocation)
AllocationDeciderDecision whether the given shard routing can be
re-balanced to the given allocation. The default is
Decision.ALWAYS.canRebalance in class AllocationDeciderpublic Decision canRebalance(RoutingAllocation allocation)
AllocationDeciderDecision whether the cluster can execute
re-balanced operations at all.
Decision.ALWAYS.canRebalance in class AllocationDecider