Class IndexMetadataVerifier
java.lang.Object
org.elasticsearch.cluster.metadata.IndexMetadataVerifier
This service is responsible for verifying index metadata when an index is introduced
to the cluster, for example when restarting nodes, importing dangling indices, or restoring
an index from a snapshot repository.
It performs the following:
- Verifies the index version is not too old.
- Tries to parse the mappings to catch compatibility bugs early.
- Identifies unknown and invalid settings and archives them.
-
Constructor Summary
ConstructorDescriptionIndexMetadataVerifier(Settings settings, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, MapperRegistry mapperRegistry, IndexScopedSettings indexScopedSettings, ScriptCompiler scriptCompiler)
-
Method Summary
Modifier and TypeMethodDescriptionverifyIndexMetadata(IndexMetadata indexMetadata, Version minimumIndexCompatibilityVersion)
Checks that the index can be upgraded to the current version of the master node.
-
Constructor Details
-
IndexMetadataVerifier
public IndexMetadataVerifier(Settings settings, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, MapperRegistry mapperRegistry, IndexScopedSettings indexScopedSettings, ScriptCompiler scriptCompiler)
-
-
Method Details
-
verifyIndexMetadata
public IndexMetadata verifyIndexMetadata(IndexMetadata indexMetadata, Version minimumIndexCompatibilityVersion)Checks that the index can be upgraded to the current version of the master node.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.
-