Module org.elasticsearch.xcore
Class AnomalyDetectorsIndex
java.lang.Object
org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex
Methods for handling index naming related functions
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateStateIndexAndAliasIfNecessary(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)static voidcreateStateIndexAndAliasIfNecessaryAndWaitForYellow(Client client, ClusterState state, IndexNameExpressionResolver resolver, org.elasticsearch.core.TimeValue masterNodeTimeout, ActionListener<Boolean> finalListener) static StringjobIdFromAlias(String jobResultsAliasedName) Extract the job Id from the alias name.static StringjobResultsAliasedName(String jobId) The name of the alias pointing to the indices where the job's results are storedstatic Stringstatic Stringstatic StringThe name pattern to capture all .ml-state prefixed indicesstatic StringThe name of the alias pointing to the appropriate index for writing job statestatic Stringstatic StringresultsWriteAlias(String jobId) The name of the alias pointing to the write index for a jobstatic String
-
Field Details
-
RESULTS_INDEX_MAPPINGS_VERSION
public static final int RESULTS_INDEX_MAPPINGS_VERSION- See Also:
-
-
Method Details
-
jobResultsIndexPrefix
-
jobResultsIndexPattern
-
jobResultsAliasedName
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
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
The name of the alias pointing to the write index for a job- Parameters:
jobId- Job Id- Returns:
- The write alias
-
jobStateIndexWriteAlias
The name of the alias pointing to the appropriate index for writing job state- Returns:
- The write alias name
-
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
-
resultsMapping
-