Module org.elasticsearch.server
Class DataTier.DefaultHotAllocationSettingProvider
java.lang.Object
org.elasticsearch.cluster.routing.allocation.DataTier.DefaultHotAllocationSettingProvider
- All Implemented Interfaces:
IndexSettingProvider
- Enclosing class:
DataTier
public static class DataTier.DefaultHotAllocationSettingProvider
extends Object
implements IndexSettingProvider
This setting provider injects the setting allocating all newly created indices with
index.routing.allocation.include._tier_preference: "data_hot" for a data stream index
or index.routing.allocation.include._tier_preference: "data_content" for an index not part of
a data stream unless the user overrides the setting while the index is being created
(in a create index request for instance)-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.index.IndexSettingProvider
IndexSettingProvider.Parameters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprovideAdditionalSettings(String indexName, String dataStreamName, IndexMode templateIndexMode, ProjectMetadata projectMetadata, Instant resolvedAt, Settings indexTemplateAndCreateRequestSettings, List<CompressedXContent> combinedTemplateMappings, IndexVersion indexVersion, Settings.Builder additionalSettings) Allows to provide default indexSettingsfor a newly created index.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.index.IndexSettingProvider
onUpdateMappings, overrulesTemplateAndRequestSettings
-
Constructor Details
-
DefaultHotAllocationSettingProvider
public DefaultHotAllocationSettingProvider()
-
-
Method Details
-
provideAdditionalSettings
public void provideAdditionalSettings(String indexName, @Nullable String dataStreamName, IndexMode templateIndexMode, ProjectMetadata projectMetadata, Instant resolvedAt, Settings indexTemplateAndCreateRequestSettings, List<CompressedXContent> combinedTemplateMappings, IndexVersion indexVersion, Settings.Builder additionalSettings) Description copied from interface:IndexSettingProviderAllows to provide default indexSettingsfor a newly created index.- Specified by:
provideAdditionalSettingsin interfaceIndexSettingProvider- Parameters:
indexName- The name of the new index being createddataStreamName- The name of the data stream if the index being created is part of a data stream otherwisenulltemplateIndexMode- The index mode defined in template if template creates data streams, otherwisenullis returned.projectMetadata- The current project metadata instance that doesn't yet contain the index to be createdresolvedAt- The time the request to create this new index was accepted.indexTemplateAndCreateRequestSettings- All the settings resolved from the template that matches and any settings defined on the create index requestcombinedTemplateMappings- All the mappings resolved from the template that matchesindexVersion- The index version to be used for the new index. AlwaysIndexVersion.current()when invoked during validation.additionalSettings- A settings builder to which additional settings can be added. ProvidingIndexMetadata.SETTING_VERSION_CREATEDis disallowed and leads to anIllegalArgumentExceptionduring validation of the additional settings.
-