Class AnomalyDetectorsIndex

java.lang.Object
org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex

public final class AnomalyDetectorsIndex extends Object
Methods for handling index naming related functions
  • Field Details

    • RESULTS_INDEX_MAPPINGS_VERSION

      public static final int RESULTS_INDEX_MAPPINGS_VERSION
      See Also:
  • Method Details

    • jobResultsIndexPrefix

      public static String jobResultsIndexPrefix()
    • jobResultsIndexPattern

      public static String jobResultsIndexPattern()
    • jobResultsAliasedName

      public static String jobResultsAliasedName(String jobId)
      The name of the alias pointing to the indices where the job's results are stored
      Parameters:
      jobId - Job Id
      Returns:
      The read alias
    • jobIdFromAlias

      public static String jobIdFromAlias(String jobResultsAliasedName)
      Extract the job Id from the alias name. If not an results index alias null is returned
      Parameters:
      jobResultsAliasedName - The alias
      Returns:
      The job Id
    • resultsWriteAlias

      public static String resultsWriteAlias(String jobId)
      The name of the alias pointing to the write index for a job
      Parameters:
      jobId - Job Id
      Returns:
      The write alias
    • jobStateIndexWriteAlias

      public static String jobStateIndexWriteAlias()
      The name of the alias pointing to the appropriate index for writing job state
      Returns:
      The write alias name
    • jobStateIndexPattern

      public static String jobStateIndexPattern()
      The name pattern to capture all .ml-state prefixed indices
      Returns:
      The .ml-state index pattern
    • createStateIndexAndAliasIfNecessary

      public static void createStateIndexAndAliasIfNecessary(Client client, ClusterState state, IndexNameExpressionResolver resolver, org.elasticsearch.core.TimeValue masterNodeTimeout, ActionListener<Boolean> finalListener)
      Creates the .ml-state-000001 index (if necessary) Creates the .ml-state-write alias for the .ml-state-000001 index (if necessary)
    • createStateIndexAndAliasIfNecessaryAndWaitForYellow

      public static void createStateIndexAndAliasIfNecessaryAndWaitForYellow(Client client, ClusterState state, IndexNameExpressionResolver resolver, org.elasticsearch.core.TimeValue masterNodeTimeout, ActionListener<Boolean> finalListener)
    • wrappedResultsMapping

      public static String wrappedResultsMapping()
    • resultsMapping

      public static String resultsMapping()