Module org.elasticsearch.server
Class HealthNodeTaskExecutor
java.lang.Object
org.elasticsearch.persistent.PersistentTasksExecutor<HealthNodeTaskParams>
org.elasticsearch.health.node.selection.HealthNodeTaskExecutor
Persistent task executor that is managing the
HealthNode.-
Field Summary
FieldsFields inherited from class org.elasticsearch.persistent.PersistentTasksExecutor
NO_NODE_FOUND -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthNodeTaskExecutorcreate(ClusterService clusterService, PersistentTasksService persistentTasksService, FeatureService featureService, Settings settings, ClusterSettings clusterSettings) protected HealthNodecreateTask(long id, String type, String action, TaskId parentTaskId, PersistentTasksCustomMetadata.PersistentTask<HealthNodeTaskParams> taskInProgress, Map<String, String> headers) Creates a AllocatedPersistentTask for communicating with task managergetAssignment(HealthNodeTaskParams params, Collection<DiscoveryNode> candidateNodes, ClusterState clusterState) Returns the node id from the eligible health nodesstatic List<NamedWriteableRegistry.Entry> static List<NamedXContentRegistry.Entry> protected voidnodeOperation(AllocatedPersistentTask task, HealthNodeTaskParams params, PersistentTaskState state) This operation will be executed on the executor node.Methods inherited from class org.elasticsearch.persistent.PersistentTasksExecutor
getDescription, getExecutor, getTaskName, selectLeastLoadedNode, validate
-
Field Details
-
ENABLED_SETTING
-
-
Method Details
-
create
public static HealthNodeTaskExecutor create(ClusterService clusterService, PersistentTasksService persistentTasksService, FeatureService featureService, Settings settings, ClusterSettings clusterSettings) -
nodeOperation
protected void nodeOperation(AllocatedPersistentTask task, HealthNodeTaskParams params, PersistentTaskState state) Description copied from class:PersistentTasksExecutorThis operation will be executed on the executor node.NOTE: The nodeOperation has to throw an exception, trigger task.markAsCompleted() or task.completeAndNotifyIfNeeded() methods to indicate that the persistent task has finished.
- Specified by:
nodeOperationin classPersistentTasksExecutor<HealthNodeTaskParams>
-
createTask
protected HealthNode createTask(long id, String type, String action, TaskId parentTaskId, PersistentTasksCustomMetadata.PersistentTask<HealthNodeTaskParams> taskInProgress, Map<String, String> headers) Description copied from class:PersistentTasksExecutorCreates a AllocatedPersistentTask for communicating with task manager- Overrides:
createTaskin classPersistentTasksExecutor<HealthNodeTaskParams>
-
getAssignment
public PersistentTasksCustomMetadata.Assignment getAssignment(HealthNodeTaskParams params, Collection<DiscoveryNode> candidateNodes, ClusterState clusterState) Returns the node id from the eligible health nodes- Overrides:
getAssignmentin classPersistentTasksExecutor<HealthNodeTaskParams>
-
getNamedXContentParsers
-
getNamedWriteables
-