Module org.elasticsearch.server
Package org.elasticsearch.action.bulk
Class TransportSimulateBulkAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<BulkRequest,BulkResponse>
org.elasticsearch.action.support.HandledTransportAction<BulkRequest,BulkResponse>
org.elasticsearch.action.bulk.TransportAbstractBulkAction
org.elasticsearch.action.bulk.TransportSimulateBulkAction
This action simulates bulk indexing data. Pipelines are executed for all indices that the request routes to, but no data is actually
indexed and no state is changed. Unlike TransportBulkAction, this does not push the work out to the nodes where the shards live (since
shards are not actually modified).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NodeFeature
static final NodeFeature
static final NodeFeature
static final NodeFeature
static final NodeFeature
static final NodeFeature
Fields inherited from class org.elasticsearch.action.bulk.TransportAbstractBulkAction
clusterService, indexingPressure, relativeTimeNanosProvider, systemIndices, systemWriteExecutor, threadPool, writeExecutor
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager
-
Constructor Summary
ConstructorsConstructorDescriptionTransportSimulateBulkAction
(ThreadPool threadPool, TransportService transportService, ClusterService clusterService, IngestService ingestService, ActionFilters actionFilters, IndexingPressure indexingPressure, SystemIndices systemIndices, IndicesService indicesService, NamedXContentRegistry xContentRegistry, IndexSettingProviders indexSettingProviders) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doInternalExecute
(Task task, BulkRequest bulkRequest, Executor executor, ActionListener<BulkResponse> listener, long relativeStartTimeNanos) This method creates any missing resources and actually applies the BulkRequest to the relevant indicesprotected IngestService
getIngestService
(BulkRequest request) protected Boolean
resolveFailureStore
(String indexName, Metadata metadata, long epochMillis) Determines if an index name is associated with either an existing data stream or a template for one that has the failure store enabled.Methods inherited from class org.elasticsearch.action.bulk.TransportAbstractBulkAction
buildTookInMillis, doExecute, getIndexWriteRequest, relativeTimeNanos
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnly
-
Field Details
-
SIMULATE_MAPPING_VALIDATION
-
SIMULATE_MAPPING_VALIDATION_TEMPLATES
-
SIMULATE_COMPONENT_TEMPLATE_SUBSTITUTIONS
-
SIMULATE_INDEX_TEMPLATE_SUBSTITUTIONS
-
SIMULATE_MAPPING_ADDITION
-
SIMULATE_SUPPORT_NON_TEMPLATE_MAPPING
-
-
Constructor Details
-
TransportSimulateBulkAction
@Inject public TransportSimulateBulkAction(ThreadPool threadPool, TransportService transportService, ClusterService clusterService, IngestService ingestService, ActionFilters actionFilters, IndexingPressure indexingPressure, SystemIndices systemIndices, IndicesService indicesService, NamedXContentRegistry xContentRegistry, IndexSettingProviders indexSettingProviders)
-
-
Method Details
-
doInternalExecute
protected void doInternalExecute(Task task, BulkRequest bulkRequest, Executor executor, ActionListener<BulkResponse> listener, long relativeStartTimeNanos) throws IOException Description copied from class:TransportAbstractBulkAction
This method creates any missing resources and actually applies the BulkRequest to the relevant indices- Specified by:
doInternalExecute
in classTransportAbstractBulkAction
- Parameters:
task
- The task in which this work is being donebulkRequest
- The BulkRequest of changes to make to indicesexecutor
- The executor for the thread pool in which the work is to be donelistener
- The listener to be notified of resultsrelativeStartTimeNanos
- The relative start time of this bulk load, to be used in computing the time taken for the BulkResponse- Throws:
IOException
-
getIngestService
- Overrides:
getIngestService
in classTransportAbstractBulkAction
-
resolveFailureStore
Description copied from class:TransportAbstractBulkAction
Determines if an index name is associated with either an existing data stream or a template for one that has the failure store enabled.- Specified by:
resolveFailureStore
in classTransportAbstractBulkAction
- Parameters:
indexName
- The index name to check.metadata
- Cluster state metadata.epochMillis
- A timestamp to use when resolving date math in the index name.- Returns:
- true if this is not a simulation, and the given index name corresponds to a data stream with a failure store or if it matches a template that has a data stream failure store enabled. Returns false if the index name corresponds to a data stream, but it doesn't have the failure store enabled. Returns null when it doesn't correspond to a data stream.
-