Package org.elasticsearch.action.bulk
Class TransportBulkAction
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- org.elasticsearch.action.support.TransportAction<Request,Response>
-
- org.elasticsearch.action.support.HandledTransportAction<BulkRequest,BulkResponse>
-
- org.elasticsearch.action.bulk.TransportBulkAction
-
public class TransportBulkAction extends HandledTransportAction<BulkRequest,BulkResponse>
Groups bulk request items by shard, optionally creating non-existent indices and delegates toTransportShardBulkActionfor shard-level bulk execution
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, indexNameExpressionResolver, taskManager, threadPool
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
logger
-
-
Constructor Summary
Constructors Constructor Description TransportBulkAction(Settings settings, ThreadPool threadPool, TransportService transportService, ClusterService clusterService, IngestService ingestService, TransportShardBulkAction shardBulkAction, TransportCreateIndexAction createIndexAction, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, AutoCreateIndex autoCreateIndex)TransportBulkAction(Settings settings, ThreadPool threadPool, TransportService transportService, ClusterService clusterService, IngestService ingestService, TransportShardBulkAction shardBulkAction, TransportCreateIndexAction createIndexAction, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, AutoCreateIndex autoCreateIndex, java.util.function.LongSupplier relativeTimeProvider)
-
Method Summary
Modifier and Type Method Description protected voiddoExecute(BulkRequest bulkRequest, ActionListener<BulkResponse> listener)protected voiddoExecute(Task task, BulkRequest bulkRequest, ActionListener<BulkResponse> listener)static IndexRequestgetIndexWriteRequest(DocWriteRequest docWriteRequest)Retrieves theIndexRequestfrom the providedDocWriteRequestfor index or upsert actions.-
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute, execute
-
-
-
-
Constructor Detail
-
TransportBulkAction
@Inject public TransportBulkAction(Settings settings, ThreadPool threadPool, TransportService transportService, ClusterService clusterService, IngestService ingestService, TransportShardBulkAction shardBulkAction, TransportCreateIndexAction createIndexAction, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, AutoCreateIndex autoCreateIndex)
-
TransportBulkAction
public TransportBulkAction(Settings settings, ThreadPool threadPool, TransportService transportService, ClusterService clusterService, IngestService ingestService, TransportShardBulkAction shardBulkAction, TransportCreateIndexAction createIndexAction, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, AutoCreateIndex autoCreateIndex, java.util.function.LongSupplier relativeTimeProvider)
-
-
Method Detail
-
getIndexWriteRequest
public static IndexRequest getIndexWriteRequest(DocWriteRequest docWriteRequest)
Retrieves theIndexRequestfrom the providedDocWriteRequestfor index or upsert actions. Upserts are modeled asIndexRequestinside theUpdateRequest. IgnoresDeleteRequest's- Parameters:
docWriteRequest- The request to find theIndexRequest- Returns:
- the found
IndexRequestornullif one can not be found.
-
doExecute
protected final void doExecute(BulkRequest bulkRequest, ActionListener<BulkResponse> listener)
- Specified by:
doExecutein classTransportAction<BulkRequest,BulkResponse>
-
doExecute
protected void doExecute(Task task, BulkRequest bulkRequest, ActionListener<BulkResponse> listener)
- Overrides:
doExecutein classTransportAction<BulkRequest,BulkResponse>
-
-