Package org.elasticsearch.upgrades
Class SystemIndexMigrator
java.lang.Object
org.elasticsearch.tasks.Task
org.elasticsearch.tasks.CancellableTask
org.elasticsearch.persistent.AllocatedPersistentTask
org.elasticsearch.upgrades.SystemIndexMigrator
This is where the logic to actually perform the migration lives -
run(SystemIndexMigrationTaskState) will
be invoked when the migration process is started, plus any time the node running the migration drops from the cluster/crashes/etc.
See SystemIndexMigrationTaskState for the data that's saved for node failover.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.persistent.AllocatedPersistentTask
AllocatedPersistentTask.StateNested classes/interfaces inherited from class org.elasticsearch.tasks.CancellableTask
CancellableTask.CancellationListenerNested classes/interfaces inherited from class org.elasticsearch.tasks.Task
Task.Status -
Field Summary
Fields inherited from class org.elasticsearch.tasks.Task
HEADERS_TO_COPY, TRACE_ID, TRACE_PARENT_HTTP_HEADER, X_ELASTIC_PRODUCT_ORIGIN_HTTP_HEADER, X_OPAQUE_ID_HTTP_HEADER -
Constructor Summary
ConstructorsConstructorDescriptionSystemIndexMigrator(Client client, long id, String type, String action, TaskId parentTask, SystemIndexMigrationTaskParams params, Map<String, String> headers, ClusterService clusterService, SystemIndices systemIndices, MetadataUpdateSettingsService metadataUpdateSettingsService, MetadataCreateIndexService metadataCreateIndexService, IndexScopedSettings indexScopedSettings) -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the migration queue, marks the task as failed, and saves the exception for later retrieval.voidrun(SystemIndexMigrationTaskState taskState) Methods inherited from class org.elasticsearch.persistent.AllocatedPersistentTask
getAllocationId, getFailure, getPersistentTaskId, getStatus, init, isCompleted, markAsCancelled, markAsCompleted, markAsLocallyAborted, updatePersistentTaskState, waitForPersistentTaskMethods inherited from class org.elasticsearch.tasks.CancellableTask
addListener, ensureNotCancelled, getReasonCancelled, isCancelled, notifyIfCancelled, onCancelled, shouldCancelChildrenOnCancellationMethods inherited from class org.elasticsearch.tasks.Task
getAction, getDescription, getHeader, getId, getParentTaskId, getStartTime, getStartTimeNanos, getType, headers, result, result, taskInfo, taskInfo
-
Constructor Details
-
SystemIndexMigrator
public SystemIndexMigrator(Client client, long id, String type, String action, TaskId parentTask, SystemIndexMigrationTaskParams params, Map<String, String> headers, ClusterService clusterService, SystemIndices systemIndices, MetadataUpdateSettingsService metadataUpdateSettingsService, MetadataCreateIndexService metadataCreateIndexService, IndexScopedSettings indexScopedSettings)
-
-
Method Details
-
run
-
markAsFailed
Clears the migration queue, marks the task as failed, and saves the exception for later retrieval. This method is **ASYNC**, so if you're not using it as a listener, be sure toreturnafter calling this.- Overrides:
markAsFailedin classAllocatedPersistentTask
-