Class GenerateSnapshotNameStep


public class GenerateSnapshotNameStep extends ClusterStateActionStep
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

  • Field Details

  • Constructor Details

  • Method Details

    • getSnapshotRepository

      public String getSnapshotRepository()
    • performAction

      public ProjectState performAction(Index index, ProjectState projectState)
      Specified by:
      performAction in class ClusterStateActionStep
    • isRetryable

      public boolean isRetryable()
      Description copied from class: Step
      Indicates if the step can be automatically retried when it encounters an execution error.
      Specified by:
      isRetryable in class Step
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Step
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Step
    • generateSnapshotName

      public static String generateSnapshotName(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.
    • generateSnapshotName

      public static String generateSnapshotName(String name, long now)
    • validateGeneratedSnapshotName

      @Nullable public static ActionRequestValidationException validateGeneratedSnapshotName(String snapshotPrefix, String snapshotName)