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.State
Nested classes/interfaces inherited from class org.elasticsearch.tasks.CancellableTask
CancellableTask.CancellationListener
Nested 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
ConstructorDescriptionSystemIndexMigrator
(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 TypeMethodDescriptionvoid
Clears the migration queue, marks the task as failed, and saves the exception for later retrieval.void
run
(SystemIndexMigrationTaskState taskState) Methods inherited from class org.elasticsearch.persistent.AllocatedPersistentTask
getAllocationId, getFailure, getPersistentTaskId, getStatus, init, isCompleted, markAsCancelled, markAsCompleted, markAsLocallyAborted, updatePersistentTaskState, waitForPersistentTask
Methods inherited from class org.elasticsearch.tasks.CancellableTask
addListener, ensureNotCancelled, getReasonCancelled, isCancelled, notifyIfCancelled, onCancelled, shouldCancelChildrenOnCancellation
Methods 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 toreturn
after calling this.- Overrides:
markAsFailed
in classAllocatedPersistentTask
-