Module org.elasticsearch.xcore
Package org.elasticsearch.xpack.core.ilm
Class GenerateSnapshotNameStep
java.lang.Object
org.elasticsearch.xpack.core.ilm.Step
org.elasticsearch.xpack.core.ilm.ClusterStateActionStep
org.elasticsearch.xpack.core.ilm.GenerateSnapshotNameStep
Generates a snapshot name for the given index and records it in the index metadata along with the provided snapshot repository.
The generated snapshot name will be in the format {day-indexName-policyName-randomUUID} eg.: 2020.03.30-myindex-mypolicy-cmuce-qfvmn_dstqw-ivmjc1etsa
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.core.ilm.Step
Step.StepKey -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGenerateSnapshotNameStep(Step.StepKey key, Step.StepKey nextStepKey, String snapshotRepository) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic StringgenerateSnapshotName(String name) Since snapshots need to be uniquely named, this method will resolve any date math used in the provided name, as well as appending a unique identifier so expressions that may overlap still result in unique snapshot names.static StringgenerateSnapshotName(String name, long now) inthashCode()booleanIndicates if the step can be automatically retried when it encounters an execution error.performAction(Index index, ProjectState projectState) validateGeneratedSnapshotName(String snapshotPrefix, String snapshotName) 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
-
GenerateSnapshotNameStep
public GenerateSnapshotNameStep(Step.StepKey key, Step.StepKey nextStepKey, String snapshotRepository)
-
-
Method Details
-
getSnapshotRepository
-
performAction
- Specified by:
performActionin classClusterStateActionStep
-
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
-
hashCode
public int hashCode() -
equals
-
generateSnapshotName
Since snapshots need to be uniquely named, this method will resolve any date math used in the provided name, as well as appending a unique identifier so expressions that may overlap still result in unique snapshot names. -
generateSnapshotName
-
validateGeneratedSnapshotName
@Nullable public static ActionRequestValidationException validateGeneratedSnapshotName(String snapshotPrefix, String snapshotName)
-