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, TimeValue masterNodeTimeout, ActionListener<Boolean> finalListener) Deprecated, for removal: This API element is subject to removal in a future version.static voidcreateStateIndexAndAliasIfNecessary(Client client, ProjectMetadata projectMetadata, IndexNameExpressionResolver resolver, 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, TimeValue masterNodeTimeout, ActionListener<Boolean> finalListener) Deprecated, for removal: This API element is subject to removal in a future version.static voidcreateStateIndexAndAliasIfNecessaryAndWaitForYellow(Client client, ProjectMetadata projectMetadata, IndexNameExpressionResolver resolver, TimeValue masterNodeTimeout, ActionListener<Boolean> finalListener) jobIdFromAlias(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 StringComma-separated index patterns for ML state indices for REST query strings that split on commas.static String[]Index patterns for ML state indices, including those created by major-version system-index reindex migration (for example.reindexed-v8-ml-state-000001).static 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
-
jobStateIndexPatterns
Index patterns for ML state indices, including those created by major-version system-index reindex migration (for example.reindexed-v8-ml-state-000001).Use this array with
IndexNameExpressionResolver.concreteIndexNames(org.elasticsearch.cluster.ClusterState, org.elasticsearch.action.IndicesRequest). A single comma-separated string is not equivalent: the resolver treats it as one expression. -
jobStateIndexPattern
Comma-separated index patterns for ML state indices for REST query strings that split on commas.Do not pass this value as a single argument to Java client methods that accept one index expression (for example
prepareSearch(String)); usejobStateIndexPatterns()instead.- Returns:
- index patterns for ML state indices
-
createStateIndexAndAliasIfNecessary
public static void createStateIndexAndAliasIfNecessary(Client client, ProjectMetadata projectMetadata, IndexNameExpressionResolver resolver, 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) -
createStateIndexAndAliasIfNecessary
@Deprecated(forRemoval=true) public static void createStateIndexAndAliasIfNecessary(Client client, ClusterState state, IndexNameExpressionResolver resolver, TimeValue masterNodeTimeout, ActionListener<Boolean> finalListener) Deprecated, for removal: This API element is subject to removal in a future version. -
createStateIndexAndAliasIfNecessaryAndWaitForYellow
public static void createStateIndexAndAliasIfNecessaryAndWaitForYellow(Client client, ProjectMetadata projectMetadata, IndexNameExpressionResolver resolver, TimeValue masterNodeTimeout, ActionListener<Boolean> finalListener) -
createStateIndexAndAliasIfNecessaryAndWaitForYellow
@Deprecated(forRemoval=true) public static void createStateIndexAndAliasIfNecessaryAndWaitForYellow(Client client, ClusterState state, IndexNameExpressionResolver resolver, TimeValue masterNodeTimeout, ActionListener<Boolean> finalListener) Deprecated, for removal: This API element is subject to removal in a future version. -
wrappedResultsMapping
-
resultsMapping
-
createStateIndexAndAliasIfNecessary(Client, ProjectMetadata, IndexNameExpressionResolver, TimeValue, ActionListener)