Module org.elasticsearch.server
Class FilterAllocationDecider
java.lang.Object
org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider
This 
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.
 
- required- filters required allocations. If any- requiredfilters are set the allocation is denied if the index is not in the set of- requiredto allocate on the filtered node
- include- filters "allowed" allocations. If any- includefilters are set the allocation is denied if the index is not in the set of- includefilters for the filtered node
- exclude- filters "prohibited" allocations. If any- excludefilters are set the allocation is denied if the index is in the set of- excludefilters for the filtered node
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Setting.AffixSetting<List<String>>static final Setting.AffixSetting<List<String>>static final Setting.AffixSetting<List<String>>static final String
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncanAllocate(IndexMetadata indexMetadata, RoutingNode node, RoutingAllocation allocation) Returns aDecisionwhether the given shard routing can be allocated at all at this state of theRoutingAllocation.canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Returns aDecisionwhether the given shard routing can be allocated on the given node.canRemain(IndexMetadata indexMetadata, ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Returns aDecisionwhether the given shard routing can be remain on the given node.shouldAutoExpandToNode(IndexMetadata indexMetadata, DiscoveryNode node, RoutingAllocation allocation) Returns aDecisionwhether shards of the given index should be auto-expanded to this node at this state of theRoutingAllocation.Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.AllocationDecidercanAllocate, canAllocateReplicaWhenThereIsRetentionLease, canForceAllocateDuringReplace, canForceAllocatePrimary, canRebalance, canRebalance
- 
Field Details- 
NAME- See Also:
 
- 
CLUSTER_ROUTING_REQUIRE_GROUP_SETTING
- 
CLUSTER_ROUTING_INCLUDE_GROUP_SETTING
- 
CLUSTER_ROUTING_EXCLUDE_GROUP_SETTING
 
- 
- 
Constructor Details- 
FilterAllocationDecider
 
- 
- 
Method Details- 
canAllocatepublic Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Description copied from class:AllocationDeciderReturns aDecisionwhether the given shard routing can be allocated on the given node. The default isDecision.ALWAYS.- Overrides:
- canAllocatein class- AllocationDecider
 
- 
canAllocatepublic Decision canAllocate(IndexMetadata indexMetadata, RoutingNode node, RoutingAllocation allocation) Description copied from class:AllocationDeciderReturns aDecisionwhether the given shard routing can be allocated at all at this state of theRoutingAllocation. The default isDecision.ALWAYS.- Overrides:
- canAllocatein class- AllocationDecider
 
- 
canRemainpublic Decision canRemain(IndexMetadata indexMetadata, ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Description copied from class:AllocationDeciderReturns aDecisionwhether the given shard routing can be remain on the given node. The default isDecision.ALWAYS.- Overrides:
- canRemainin class- AllocationDecider
 
- 
shouldAutoExpandToNodepublic Decision shouldAutoExpandToNode(IndexMetadata indexMetadata, DiscoveryNode node, RoutingAllocation allocation) Description copied from class:AllocationDeciderReturns aDecisionwhether shards of the given index should be auto-expanded to this node at this state of theRoutingAllocation. The default isDecision.ALWAYS.- Overrides:
- shouldAutoExpandToNodein class- AllocationDecider
 
 
-