Module org.elasticsearch.xcore
Package org.elasticsearch.xpack.core.ilm
Class ReplaceDataStreamBackingIndexStep
java.lang.Object
org.elasticsearch.xpack.core.ilm.Step
org.elasticsearch.xpack.core.ilm.ClusterStateActionStep
org.elasticsearch.xpack.core.ilm.ReplaceDataStreamBackingIndexStep
This step replaces a data stream backing index with the target index, as part of the data stream's backing indices.
Eg. if data stream `foo-stream` is backed by indices [`foo-stream-000001`, `foo-stream-000002`] and we'd like to replace the first
generation index, `foo-stream-000001`, with `shrink-foo-stream-000001`, after this step the `foo-stream` data stream will contain
the following indices
[`shrink-foo-stream-000001`, `foo-stream-000002`]
The `foo-stream-000001` index will continue to exist but will not be part of the data stream anymore.
As the last generation is the write index of the data stream, replacing the last generation index is not allowed.
This is useful in scenarios following a restore from snapshot operation where the restored index will take the place of the source index in the ILM lifecycle or in the case where we shrink an index and the shrunk index will take the place of the original index.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.core.ilm.Step
Step.StepKey -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReplaceDataStreamBackingIndexStep(Step.StepKey key, Step.StepKey nextStepKey, BiFunction<String, LifecycleExecutionState, String> targetIndexNameSupplier) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanIndicates if the step can be automatically retried when it encounters an execution error.performAction(Index index, ProjectState projectState) Methods inherited from class org.elasticsearch.xpack.core.ilm.ClusterStateActionStep
indexForAsyncInvocationMethods inherited from class org.elasticsearch.xpack.core.ilm.Step
getCurrentStepKey, getKey, getNextStepKey, toString
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
ReplaceDataStreamBackingIndexStep
public ReplaceDataStreamBackingIndexStep(Step.StepKey key, Step.StepKey nextStepKey, BiFunction<String, LifecycleExecutionState, String> targetIndexNameSupplier)
-
-
Method Details
-
isRetryable
public boolean isRetryable()Description copied from class:StepIndicates if the step can be automatically retried when it encounters an execution error.- Specified by:
isRetryablein classStep
-
getTargetIndexNameSupplier
-
performAction
- Specified by:
performActionin classClusterStateActionStep
-
hashCode
public int hashCode() -
equals
-