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 and Description |
---|---|
static class |
ClusterRebalanceAllocationDecider.ClusterRebalanceType
An enum representation for the configured re-balance type.
|
Modifier and Type | Field and Description |
---|---|
static Setting<ClusterRebalanceAllocationDecider.ClusterRebalanceType> |
CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING |
static java.lang.String |
NAME |
deprecationLogger, logger, settings
Constructor and Description |
---|
ClusterRebalanceAllocationDecider(Settings settings,
ClusterSettings clusterSettings) |
Modifier and Type | Method and 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. |
canAllocate, canAllocate, canAllocate, canAllocate, canForceAllocatePrimary, canRemain
logDeprecatedSetting, logRemovedSetting, nodeName
public 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)
AllocationDecider
Decision
whether the given shard routing can be
re-balanced to the given allocation. The default is
Decision.ALWAYS
.canRebalance
in class AllocationDecider
public Decision canRebalance(RoutingAllocation allocation)
AllocationDecider
Decision
whether the cluster can execute
re-balanced operations at all.
Decision.ALWAYS
.canRebalance
in class AllocationDecider