Class NodeRemovalClusterStateTaskExecutor
org.elasticsearch.cluster.coordination.NodeRemovalClusterStateTaskExecutor
- All Implemented Interfaces:
ClusterStateTaskExecutor<NodeRemovalClusterStateTaskExecutor.Task>
,ClusterStateTaskListener
public class NodeRemovalClusterStateTaskExecutor
extends
implements ClusterStateTaskExecutor<NodeRemovalClusterStateTaskExecutor.Task>, ClusterStateTaskListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.ClusterStateTaskExecutor
ClusterStateTaskExecutor.ClusterTasksResult<T>, ClusterStateTaskExecutor.TaskResult
-
Constructor Summary
ConstructorDescriptionNodeRemovalClusterStateTaskExecutor(AllocationService allocationService, org.apache.logging.log4j.Logger logger)
-
Method Summary
Modifier and TypeMethodDescriptionexecute(ClusterState currentState, <NodeRemovalClusterStateTaskExecutor.Task> tasks)
Update the cluster state based on the current state and the given tasks.getTaskClusterTasksResult(ClusterState currentState, <NodeRemovalClusterStateTaskExecutor.Task> tasks, ClusterState remainingNodesClusterState)
void
source, e)
A callback for when task execution fails.void
source)
A callback for when the task was rejected because the processing node is no longer the elected master.protected ClusterState
remainingNodesClusterState(ClusterState currentState, DiscoveryNodes.Builder remainingNodesBuilder)
Methods inherited from class java.lang.
, , , , , , , , , ,
Methods inherited from interface org.elasticsearch.cluster.ClusterStateTaskExecutor
clusterStatePublished, describeTasks, runOnlyOnMaster
Methods 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, <NodeRemovalClusterStateTaskExecutor.Task> tasks) throwsDescription copied from interface:ClusterStateTaskExecutor
Update the cluster state based on the current state and the given tasks. Return the *same instance* if no state should be changed.- Specified by:
execute
in interfaceClusterStateTaskExecutor<NodeRemovalClusterStateTaskExecutor.Task>
- Throws:
-
getTaskClusterTasksResult
protected ClusterStateTaskExecutor.ClusterTasksResult<NodeRemovalClusterStateTaskExecutor.Task> getTaskClusterTasksResult(ClusterState currentState, <NodeRemovalClusterStateTaskExecutor.Task> tasks, ClusterState remainingNodesClusterState) -
remainingNodesClusterState
protected ClusterState remainingNodesClusterState(ClusterState currentState, DiscoveryNodes.Builder remainingNodesBuilder) -
onFailure
public void onFailure( source, e)Description copied from interface:ClusterStateTaskListener
A callback for when task execution fails. Implementations of this callback should not throw exceptions: an exception thrown here is logged by the master service atERROR
level 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:
onFailure
in interfaceClusterStateTaskListener
-
onNoLongerMaster
public void onNoLongerMaster( source)Description copied from interface:ClusterStateTaskListener
A 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 atERROR
level 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:
onNoLongerMaster
in interfaceClusterStateTaskListener
-