public class AllocationDeciders extends AllocationDecider
AllocationDecider
combining the "decision" of multiple
AllocationDecider
implementations into a single allocation decision.deprecationLogger, logger, settings
Constructor and Description |
---|
AllocationDeciders(Settings settings,
java.util.Collection<AllocationDecider> allocations) |
Modifier and Type | Method and Description |
---|---|
Decision |
canAllocate(IndexMetaData indexMetaData,
RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given shard routing can be allocated at all at this state of the
RoutingAllocation . |
Decision |
canAllocate(RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given node can allow any allocation at all at this state of the
RoutingAllocation . |
Decision |
canAllocate(ShardRouting shardRouting,
RoutingAllocation allocation)
Returns a
Decision whether the given shard routing can be allocated at all at this state of the
RoutingAllocation . |
Decision |
canAllocate(ShardRouting shardRouting,
RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given shard routing can be
allocated on the given node. |
Decision |
canForceAllocatePrimary(ShardRouting shardRouting,
RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given primary shard can be
forcibly allocated on the given node. |
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. |
Decision |
canRemain(ShardRouting shardRouting,
RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given shard routing can be remain
on the given node. |
logDeprecatedSetting, logRemovedSetting, nodeName
public AllocationDeciders(Settings settings, java.util.Collection<AllocationDecider> allocations)
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 canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
AllocationDecider
Decision
whether the given shard routing can be
allocated on the given node. The default is Decision.ALWAYS
.canAllocate
in class AllocationDecider
public Decision canRemain(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
AllocationDecider
Decision
whether the given shard routing can be remain
on the given node. The default is Decision.ALWAYS
.canRemain
in class AllocationDecider
public Decision canAllocate(IndexMetaData indexMetaData, RoutingNode node, RoutingAllocation allocation)
AllocationDecider
Decision
whether the given shard routing can be allocated at all at this state of the
RoutingAllocation
. The default is Decision.ALWAYS
.canAllocate
in class AllocationDecider
public Decision canAllocate(ShardRouting shardRouting, RoutingAllocation allocation)
AllocationDecider
Decision
whether the given shard routing can be allocated at all at this state of the
RoutingAllocation
. The default is Decision.ALWAYS
.canAllocate
in class AllocationDecider
public Decision canAllocate(RoutingNode node, RoutingAllocation allocation)
AllocationDecider
Decision
whether the given node can allow any allocation at all at this state of the
RoutingAllocation
. The default is Decision.ALWAYS
.canAllocate
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
public Decision canForceAllocatePrimary(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
AllocationDecider
Decision
whether the given primary shard can be
forcibly allocated on the given node. This method should only be called
for unassigned primary shards where the node has a shard copy on disk.
Note: all implementations that override this behavior should take into account
the results of AllocationDecider.canAllocate(ShardRouting, RoutingNode, RoutingAllocation)
before making a decision on force allocation, because force allocation should only
be considered if all deciders return Decision.NO
.canForceAllocatePrimary
in class AllocationDecider