Class AnomalyDetectorsIndex
java.lang.Object
org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex
Methods for handling index naming related functions
-
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 StringjobResultsAliasedName(String jobId) The name of the alias pointing to the indices where the job's results are storedstatic 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 Stringstatic StringwrappedResultsMapping(String mappingType)
-
Method Details
-
jobResultsIndexPrefix
-
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
-
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
-
wrappedResultsMapping
-
resultsMapping
-