java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
org.elasticsearch.action.support.HandledTransportAction<BulkRequest,BulkResponse>
org.elasticsearch.action.bulk.TransportBulkAction
- Direct Known Subclasses:
TransportSimulateBulkAction
Groups bulk request items by shard, optionally creating non-existent indices and
delegates to
TransportShardBulkAction
for shard-level bulk execution-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final ActionType<BulkResponse>
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager
-
Constructor Summary
ConstructorsConstructorDescriptionTransportBulkAction
(ThreadPool threadPool, TransportService transportService, ClusterService clusterService, IngestService ingestService, FeatureService featureService, NodeClient client, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, IndexingPressure indexingPressure, SystemIndices systemIndices) TransportBulkAction
(ThreadPool threadPool, TransportService transportService, ClusterService clusterService, IngestService ingestService, FeatureService featureService, NodeClient client, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, IndexingPressure indexingPressure, SystemIndices systemIndices, LongSupplier relativeTimeProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected long
buildTookInMillis
(long startTimeNanos) protected void
createMissingIndicesAndIndexData
(Task task, BulkRequest bulkRequest, Executor executor, ActionListener<BulkResponse> listener, Map<String, Boolean> indicesToAutoCreate, Set<String> dataStreamsToBeRolledOver, Map<String, IndexNotFoundException> indicesThatCannotBeCreated, long startTime) protected void
doExecute
(Task task, BulkRequest bulkRequest, ActionListener<BulkResponse> listener) protected void
doInternalExecute
(Task task, BulkRequest bulkRequest, Executor executor, ActionListener<BulkResponse> listener) static IndexRequest
getIndexWriteRequest
(DocWriteRequest<?> docWriteRequest) Retrieves theIndexRequest
from the providedDocWriteRequest
for index or upsert actions.protected IngestService
getIngestService
(BulkRequest request) static <Response extends ReplicationResponse & WriteResponse>
ActionListener<BulkResponse>unwrappingSingleItemBulkResponse
(ActionListener<Response> listener) Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, localOnly
-
Field Details
-
NAME
- See Also:
-
TYPE
-
LAZY_ROLLOVER_ORIGIN
- See Also:
-
-
Constructor Details
-
TransportBulkAction
@Inject public TransportBulkAction(ThreadPool threadPool, TransportService transportService, ClusterService clusterService, IngestService ingestService, FeatureService featureService, NodeClient client, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, IndexingPressure indexingPressure, SystemIndices systemIndices) -
TransportBulkAction
public TransportBulkAction(ThreadPool threadPool, TransportService transportService, ClusterService clusterService, IngestService ingestService, FeatureService featureService, NodeClient client, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, IndexingPressure indexingPressure, SystemIndices systemIndices, LongSupplier relativeTimeProvider)
-
-
Method Details
-
getIndexWriteRequest
Retrieves theIndexRequest
from the providedDocWriteRequest
for index or upsert actions. Upserts are modeled asIndexRequest
inside theUpdateRequest
. IgnoresDeleteRequest
's- Parameters:
docWriteRequest
- The request to find theIndexRequest
- Returns:
- the found
IndexRequest
ornull
if one can not be found.
-
unwrappingSingleItemBulkResponse
public static <Response extends ReplicationResponse & WriteResponse> ActionListener<BulkResponse> unwrappingSingleItemBulkResponse(ActionListener<Response> listener) -
doExecute
- Specified by:
doExecute
in classTransportAction<BulkRequest,
BulkResponse>
-
doInternalExecute
protected void doInternalExecute(Task task, BulkRequest bulkRequest, Executor executor, ActionListener<BulkResponse> listener) -
createMissingIndicesAndIndexData
protected void createMissingIndicesAndIndexData(Task task, BulkRequest bulkRequest, Executor executor, ActionListener<BulkResponse> listener, Map<String, Boolean> indicesToAutoCreate, Set<String> dataStreamsToBeRolledOver, Map<String, IndexNotFoundException> indicesThatCannotBeCreated, long startTime) -
getIngestService
-
buildTookInMillis
protected long buildTookInMillis(long startTimeNanos)
-