public class FilterAllocationDecider extends AllocationDecider
AllocationDecider
control shard allocation by include and
exclude filters via dynamic cluster and index routing settings.
This filter is used to make explicit decision on which nodes certain shard can / should be allocated. The decision if a shard can be allocated, must not be allocated or should be allocated is based on either cluster wide dynamic settings (cluster.routing.allocation.*) or index specific dynamic settings (index.routing.allocation.*). All of those settings can be changed at runtime via the cluster or the index update settings API.
Note: Cluster settings are applied first and will override index specific settings such that if a shard can be allocated according to the index routing settings it wont be allocated on a node if the cluster specific settings would disallow the allocation. Filters are applied in the following order:Modifier and Type | Field and Description |
---|---|
static String |
CLUSTER_ROUTING_EXCLUDE_GROUP |
static String |
CLUSTER_ROUTING_INCLUDE_GROUP |
static String |
CLUSTER_ROUTING_REQUIRE_GROUP |
static String |
INDEX_ROUTING_EXCLUDE_GROUP |
static String |
INDEX_ROUTING_INCLUDE_GROUP |
static String |
INDEX_ROUTING_REQUIRE_GROUP |
static String |
NAME |
deprecationLogger, logger, settings
Constructor and Description |
---|
FilterAllocationDecider(Settings settings,
NodeSettingsService nodeSettingsService) |
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(ShardRouting shardRouting,
RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given shard routing can be
allocated on the given node. |
Decision |
canRemain(ShardRouting shardRouting,
RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given shard routing can be remain
on the given node. |
canAllocate, canAllocate, canRebalance, canRebalance
logDeprecatedSetting, logRemovedSetting, nodeName
public static final String NAME
public static final String INDEX_ROUTING_REQUIRE_GROUP
public static final String INDEX_ROUTING_INCLUDE_GROUP
public static final String INDEX_ROUTING_EXCLUDE_GROUP
public static final String CLUSTER_ROUTING_REQUIRE_GROUP
public static final String CLUSTER_ROUTING_INCLUDE_GROUP
public static final String CLUSTER_ROUTING_EXCLUDE_GROUP
@Inject public FilterAllocationDecider(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 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 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
Copyright © 2009–2016. All rights reserved.