Class SearchableSnapshotAction

java.lang.Object
org.elasticsearch.xpack.core.ilm.SearchableSnapshotAction
All Implemented Interfaces:
NamedWriteable, Writeable, ToXContent, ToXContentObject, LifecycleAction

public class SearchableSnapshotAction extends Object implements LifecycleAction
A LifecycleAction that will convert the index into a searchable snapshot, by taking a snapshot of the index, creating a searchable snapshot and the corresponding "searchable snapshot index", deleting the original index and swapping its aliases to the newly created searchable snapshot backed index.
  • Field Details

  • Constructor Details

    • SearchableSnapshotAction

      public SearchableSnapshotAction(String snapshotRepository, boolean forceMergeIndex, @Nullable Integer totalShardsPerNode, @Nullable TimeValue replicateFor, @Nullable Boolean forceMergeOnClone)
    • SearchableSnapshotAction

      public SearchableSnapshotAction(String snapshotRepository, boolean forceMergeIndex)
    • SearchableSnapshotAction

      public SearchableSnapshotAction(String snapshotRepository)
    • SearchableSnapshotAction

      public SearchableSnapshotAction(StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • parse

      public static SearchableSnapshotAction parse(XContentParser parser)
    • isForceMergeIndex

      public boolean isForceMergeIndex()
    • getSnapshotRepository

      public String getSnapshotRepository()
    • getTotalShardsPerNode

      @Nullable public Integer getTotalShardsPerNode()
    • getReplicateFor

      @Nullable public TimeValue getReplicateFor()
    • isForceMergeOnClone

      @Nullable public Boolean isForceMergeOnClone()
    • toSteps

      public List<Step> toSteps(Client client, String phase, Step.StepKey nextStepKey)
      Description copied from interface: LifecycleAction
      converts the LifecycleAction's execution plan into a series of Steps that reference each other to preserve order of operations.
      Specified by:
      toSteps in interface LifecycleAction
      Parameters:
      client - the client that will be used by AsyncActionStep and AsyncWaitStep steps
      phase - the name of the phase this action is being executed within
      nextStepKey - the next step to execute after this action's steps. If null, then there are no further steps to run. It is the responsibility of each LifecycleAction to implement this correctly and not forget to link to this final step so that the policy can continue.
      Returns:
      an ordered list of steps that represent the execution plan of the action
    • toSteps

      public List<Step> toSteps(Client client, String phase, Step.StepKey nextStepKey, XPackLicenseState licenseState)
      Description copied from interface: LifecycleAction
      converts the LifecycleAction's execution plan into a series of Steps that reference each other to preserve order of operations. This overload allows access to license state.
      Specified by:
      toSteps in interface LifecycleAction
      Parameters:
      client - the client that will be used by AsyncActionStep and AsyncWaitStep steps
      phase - the name of the phase this action is being executed within
      nextStepKey - the next step to execute after this action's steps. If null, then there are no further steps to run. It is the responsibility of each LifecycleAction to implement this correctly and not forget to link to this final step so that the policy can continue.
      licenseState - the license state to use for actions that need license checks.
      Returns:
      an ordered list of steps that represent the execution plan of the action
    • isSafeAction

      public boolean isSafeAction()
      Specified by:
      isSafeAction in interface LifecycleAction
      Returns:
      true if this action is considered safe. An action is not safe if it will produce unwanted side effects or will get stuck when the action configuration is changed while an index is in this action
    • getWriteableName

      public String getWriteableName()
      Specified by:
      getWriteableName in interface NamedWriteable
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toXContent

      public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface ToXContent
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object