public class MetaDataIndexUpgradeService extends AbstractComponent
Every time an existing index is introduced into cluster this service should be used to upgrade the existing index metadata to the latest version of the cluster. It typically occurs during cluster upgrade, when dangling indices are imported into the cluster or indices are restored from a repository.
Modifier and Type | Field and Description |
---|---|
static Set<String> |
INDEX_BYTES_SIZE_SETTINGS
All known byte-sized settings for an index.
|
static Set<String> |
INDEX_TIME_SETTINGS
All known time settings for an index.
|
deprecationLogger, logger, settings
Constructor and Description |
---|
MetaDataIndexUpgradeService(Settings settings,
ScriptService scriptService,
MapperRegistry mapperRegistry) |
Modifier and Type | Method and Description |
---|---|
IndexMetaData |
upgradeIndexMetaData(IndexMetaData indexMetaData)
Checks that the index can be upgraded to the current version of the master node.
|
logDeprecatedSetting, logRemovedSetting, nodeName
public static final Set<String> INDEX_BYTES_SIZE_SETTINGS
@Inject public MetaDataIndexUpgradeService(Settings settings, ScriptService scriptService, MapperRegistry mapperRegistry)
public IndexMetaData upgradeIndexMetaData(IndexMetaData indexMetaData)
If the index does not need upgrade it returns the index metadata unchanged, otherwise it returns a modified index metadata. If index cannot be updated the method throws an exception.
Copyright © 2009–2016. All rights reserved.