Module org.elasticsearch.server
Class TransportSimulateIndexTemplateAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
org.elasticsearch.action.support.local.TransportLocalClusterStateAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
org.elasticsearch.action.support.local.TransportLocalProjectMetadataAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
org.elasticsearch.action.admin.indices.template.post.TransportSimulateIndexTemplateAction
public class TransportSimulateIndexTemplateAction
extends TransportLocalProjectMetadataAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
-
Field Summary
Fields inherited from class org.elasticsearch.action.support.local.TransportLocalClusterStateAction
clusterService, executorFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportSimulateIndexTemplateAction(TransportService transportService, ClusterService clusterService, MetadataIndexTemplateService indexTemplateService, ActionFilters actionFilters, NamedXContentRegistry xContentRegistry, IndicesService indicesService, SystemIndices systemIndices, IndexSettingProviders indexSettingProviders, ProjectResolver projectResolver) NB prior to 9.0 this was a TransportMasterNodeReadAction so for BwC it must be registered with the TransportService until we no longer need to support calling this action remotely. -
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockExceptioncheckBlock(SimulateIndexTemplateRequest request, ProjectState state) protected voidlocalClusterStateOperation(Task task, SimulateIndexTemplateRequest request, ProjectState state, ActionListener<SimulateIndexTemplateResponse> listener) static TemplateresolveTemplate(String matchingTemplate, String indexName, ProjectMetadata simulatedProject, boolean isDslOnlyMode, NamedXContentRegistry xContentRegistry, IndicesService indicesService, SystemIndices systemIndices, Set<IndexSettingProvider> indexSettingProviders) Take a template and index name as well as state where the template exists, and return a finalTemplatethat represents all the resolved Settings, Mappings, Aliases and Lifecyclestatic ProjectMetadataresolveTemporaryState(String matchingTemplate, String indexName, ProjectMetadata simulatedProject) Return a temporary cluster state with an index that exists using the matched template's settingsMethods inherited from class org.elasticsearch.action.support.local.TransportLocalProjectMetadataAction
checkBlock, localClusterStateOperationMethods inherited from class org.elasticsearch.action.support.local.TransportLocalClusterStateAction
doExecuteMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnly
-
Constructor Details
-
TransportSimulateIndexTemplateAction
@Inject public TransportSimulateIndexTemplateAction(TransportService transportService, ClusterService clusterService, MetadataIndexTemplateService indexTemplateService, ActionFilters actionFilters, NamedXContentRegistry xContentRegistry, IndicesService indicesService, SystemIndices systemIndices, IndexSettingProviders indexSettingProviders, ProjectResolver projectResolver) NB prior to 9.0 this was a TransportMasterNodeReadAction so for BwC it must be registered with the TransportService until we no longer need to support calling this action remotely.
-
-
Method Details
-
localClusterStateOperation
protected void localClusterStateOperation(Task task, SimulateIndexTemplateRequest request, ProjectState state, ActionListener<SimulateIndexTemplateResponse> listener) throws Exception - Specified by:
localClusterStateOperationin classTransportLocalProjectMetadataAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse> - Throws:
Exception
-
checkBlock
protected ClusterBlockException checkBlock(SimulateIndexTemplateRequest request, ProjectState state) - Specified by:
checkBlockin classTransportLocalProjectMetadataAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
-
resolveTemporaryState
public static ProjectMetadata resolveTemporaryState(String matchingTemplate, String indexName, ProjectMetadata simulatedProject) Return a temporary cluster state with an index that exists using the matched template's settings -
resolveTemplate
public static Template resolveTemplate(String matchingTemplate, String indexName, ProjectMetadata simulatedProject, boolean isDslOnlyMode, NamedXContentRegistry xContentRegistry, IndicesService indicesService, SystemIndices systemIndices, Set<IndexSettingProvider> indexSettingProviders) throws Exception Take a template and index name as well as state where the template exists, and return a finalTemplatethat represents all the resolved Settings, Mappings, Aliases and Lifecycle- Throws:
Exception
-