Class NodeRemovalClusterStateTaskExecutor
java.lang.Object
org.elasticsearch.cluster.coordination.NodeRemovalClusterStateTaskExecutor
- All Implemented Interfaces:
ClusterStateTaskExecutor<NodeRemovalClusterStateTaskExecutor.Task>,ClusterStateTaskListener
public class NodeRemovalClusterStateTaskExecutor
extends Object
implements ClusterStateTaskExecutor<NodeRemovalClusterStateTaskExecutor.Task>, ClusterStateTaskListener
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.cluster.ClusterStateTaskExecutor
ClusterStateTaskExecutor.ClusterTasksResult<T>, ClusterStateTaskExecutor.TaskResult -
Constructor Summary
ConstructorsConstructorDescriptionNodeRemovalClusterStateTaskExecutor(AllocationService allocationService, org.apache.logging.log4j.Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionexecute(ClusterState currentState, List<NodeRemovalClusterStateTaskExecutor.Task> tasks)Update the cluster state based on the current state and the given tasks.getTaskClusterTasksResult(ClusterState currentState, List<NodeRemovalClusterStateTaskExecutor.Task> tasks, ClusterState remainingNodesClusterState)voidA callback for when task execution fails.voidonNoLongerMaster(String source)A callback for when the task was rejected because the processing node is no longer the elected master.protected ClusterStateremainingNodesClusterState(ClusterState currentState, DiscoveryNodes.Builder remainingNodesBuilder)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.ClusterStateTaskExecutor
clusterStatePublished, describeTasks, runOnlyOnMasterMethods inherited from interface org.elasticsearch.cluster.ClusterStateTaskListener
clusterStateProcessed
-
Constructor Details
-
NodeRemovalClusterStateTaskExecutor
public NodeRemovalClusterStateTaskExecutor(AllocationService allocationService, org.apache.logging.log4j.Logger logger)
-
-
Method Details
-
execute
public ClusterStateTaskExecutor.ClusterTasksResult<NodeRemovalClusterStateTaskExecutor.Task> execute(ClusterState currentState, List<NodeRemovalClusterStateTaskExecutor.Task> tasks) throws ExceptionDescription copied from interface:ClusterStateTaskExecutorUpdate the cluster state based on the current state and the given tasks. Return the *same instance* if no state should be changed.- Specified by:
executein interfaceClusterStateTaskExecutor<NodeRemovalClusterStateTaskExecutor.Task>- Throws:
Exception
-
getTaskClusterTasksResult
protected ClusterStateTaskExecutor.ClusterTasksResult<NodeRemovalClusterStateTaskExecutor.Task> getTaskClusterTasksResult(ClusterState currentState, List<NodeRemovalClusterStateTaskExecutor.Task> tasks, ClusterState remainingNodesClusterState) -
remainingNodesClusterState
protected ClusterState remainingNodesClusterState(ClusterState currentState, DiscoveryNodes.Builder remainingNodesBuilder) -
onFailure
Description copied from interface:ClusterStateTaskListenerA callback for when task execution fails. Implementations of this callback should not throw exceptions: an exception thrown here is logged by the master service atERRORlevel and otherwise ignored. If log-and-ignore is the right behaviour then implementations should do so themselves, typically using a more specific logger and at a less dramatic log level.- Specified by:
onFailurein interfaceClusterStateTaskListener
-
onNoLongerMaster
Description copied from interface:ClusterStateTaskListenerA callback for when the task was rejected because the processing node is no longer the elected master. Implementations of this callback should not throw exceptions: an exception thrown here is logged by the master service atERRORlevel and otherwise ignored. If log-and-ignore is the right behaviour then implementations should do so themselves, typically using a more specific logger and at a less dramatic log level.- Specified by:
onNoLongerMasterin interfaceClusterStateTaskListener
-