Class EnableAssignmentDecider
java.lang.Object
org.elasticsearch.persistent.decider.EnableAssignmentDecider
public class EnableAssignmentDecider
extends java.lang.Object
EnableAssignmentDecider is used to allow/disallow the persistent tasks
to be assigned to cluster nodes.
Allocation settings can have the following values (non-casesensitive):
-
NONE- no persistent tasks can be assigned -
ALL- all persistent tasks can be assigned to nodes
- See Also:
EnableAssignmentDecider.Allocation
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEnableAssignmentDecider.AllocationAllocation values or rather their string representation to be used used withCLUSTER_TASKS_ALLOCATION_ENABLE_SETTINGvia cluster settings. -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALLOCATION_NONE_EXPLANATIONstatic Setting<EnableAssignmentDecider.Allocation>CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING -
Constructor Summary
Constructors Constructor Description EnableAssignmentDecider(Settings settings, ClusterSettings clusterSettings) -
Method Summary
Modifier and Type Method Description AssignmentDecisioncanAssign()Returns aAssignmentDecisionwhether the given persistent task can be assigned to a node of the cluster.voidsetEnableAssignment(EnableAssignmentDecider.Allocation enableAssignment)
-
Field Details
-
CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING
public static final Setting<EnableAssignmentDecider.Allocation> CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING -
ALLOCATION_NONE_EXPLANATION
public static final java.lang.String ALLOCATION_NONE_EXPLANATION- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
setEnableAssignment
-
canAssign
Returns aAssignmentDecisionwhether the given persistent task can be assigned to a node of the cluster. The decision depends on the current value of the settingCLUSTER_TASKS_ALLOCATION_ENABLE_SETTING.- Returns:
- the
AssignmentDecision
-