public class EnableAllocationDecider extends AllocationDecider implements NodeSettingsService.Listener
CLUSTER_ROUTING_ALLOCATION_ENABLE
and the per index setting INDEX_ROUTING_ALLOCATION_ENABLE
. The per index settings overrides the cluster wide
setting. Depending on the
Both settings can have the following values:
NONE
, no shard allocation is allowed.
NEW_PRIMARIES
only primary shards of new indices are allowed to be allocated
PRIMARIES
only primary shards (of any index) are allowed to be allocated
ALL
all shards are allowed to be allocated
Modifier and Type | Class and Description |
---|---|
static class |
EnableAllocationDecider.Allocation |
Modifier and Type | Field and Description |
---|---|
static String |
CLUSTER_ROUTING_ALLOCATION_ENABLE |
static String |
INDEX_ROUTING_ALLOCATION_ENABLE |
static String |
NAME |
componentSettings, logger, settings
Constructor and Description |
---|
EnableAllocationDecider(Settings settings,
NodeSettingsService nodeSettingsService) |
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. |
void |
onRefreshSettings(Settings settings) |
canAllocate, canAllocate, canRebalance, canRemain
nodeName
public static final String NAME
public static final String CLUSTER_ROUTING_ALLOCATION_ENABLE
public static final String INDEX_ROUTING_ALLOCATION_ENABLE
@Inject public EnableAllocationDecider(Settings settings, NodeSettingsService nodeSettingsService)
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 void onRefreshSettings(Settings settings)
onRefreshSettings
in interface NodeSettingsService.Listener
Copyright © 2009–2015. All rights reserved.