public class SameShardAllocationDecider extends AllocationDecider
CLUSTER_ROUTING_ALLOCATION_SAME_HOST_SETTING
setting allows to perform a check to prevent
allocation of multiple instances of the same shard on a single host,
based on host name and host address. Defaults to `false`, meaning that no
check is performed by default.
Note: this setting only applies if multiple nodes are started on the same host. Allocations of multiple copies of the same shard on the same node are not allowed independently of this setting.
Modifier and Type | Field and Description |
---|---|
static Setting<java.lang.Boolean> |
CLUSTER_ROUTING_ALLOCATION_SAME_HOST_SETTING |
static java.lang.String |
NAME |
deprecationLogger, logger, settings
Constructor and Description |
---|
SameShardAllocationDecider(Settings settings) |
Modifier and Type | Method and Description |
---|---|
Decision |
canAllocate(ShardRouting shardRouting,
RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given shard routing can be
allocated on the given node. |
canAllocate, canAllocate, canAllocate, canForceAllocatePrimary, canRebalance, canRebalance, canRemain
logDeprecatedSetting, logRemovedSetting, nodeName
public static final java.lang.String NAME
public static final Setting<java.lang.Boolean> CLUSTER_ROUTING_ALLOCATION_SAME_HOST_SETTING
public SameShardAllocationDecider(Settings settings)
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