Package org.elasticsearch.action.bulk
Class TransportShardBulkAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
org.elasticsearch.action.support.replication.TransportReplicationAction<Request,ReplicaRequest,Response>
org.elasticsearch.action.support.replication.TransportWriteAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>
org.elasticsearch.action.bulk.TransportShardBulkAction
public class TransportShardBulkAction extends TransportWriteAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>
Performs shard-level bulk (index, delete or update) operations
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.support.replication.TransportWriteAction
TransportWriteAction.WritePrimaryResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>,Response extends ReplicationResponse & WriteResponse>, TransportWriteAction.WriteReplicaResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>>Nested classes/interfaces inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
TransportReplicationAction.ConcreteReplicaRequest<R extends TransportRequest>, TransportReplicationAction.ConcreteShardRequest<R extends TransportRequest>, TransportReplicationAction.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>, TransportReplicationAction.ReplicaResponse, TransportReplicationAction.ReplicaResult, TransportReplicationAction.ReplicasProxy, TransportReplicationAction.RetryOnReplicaException -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACTION_NAMEFields inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
clusterService, executor, indicesService, shardStateAction, threadPool, transportOptions, transportPrimaryAction, transportReplicaAction, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
Constructors Constructor Description TransportShardBulkAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, MappingUpdatedAction mappingUpdatedAction, UpdateHelper updateHelper, ActionFilters actionFilters) -
Method Summary
Methods inherited from class org.elasticsearch.action.support.replication.TransportWriteAction
globalBlockLevel, indexBlockLevel, locationToSync, newReplicasProxy, syncOperationResultOrThrowMethods inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
acquirePrimaryOperationPermit, acquireReplicaOperationPermit, adaptResponse, doExecute, handleOperationRequest, handlePrimaryRequest, handleReplicaRequest, resolveRequest, retryPrimaryException, wrapResponseActionListenerMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute
-
Field Details
-
ACTION_NAME
public static final java.lang.String ACTION_NAME- See Also:
- Constant Field Values
-
-
Constructor Details
-
TransportShardBulkAction
@Inject public TransportShardBulkAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, MappingUpdatedAction mappingUpdatedAction, UpdateHelper updateHelper, ActionFilters actionFilters)
-
-
Method Details
-
transportOptions
- Overrides:
transportOptionsin classTransportReplicationAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>
-
newResponseInstance
- Specified by:
newResponseInstancein classTransportReplicationAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>- Throws:
java.io.IOException
-
shardOperationOnPrimary
protected void shardOperationOnPrimary(BulkShardRequest request, IndexShard primary, ActionListener<TransportReplicationAction.PrimaryResult<BulkShardRequest,BulkShardResponse>> listener)Description copied from class:TransportWriteActionCalled on the primary with a reference to the primary IndexShard to modify.- Specified by:
shardOperationOnPrimaryin classTransportWriteAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>- Parameters:
request- the request to the primary shardprimary- the primary shard to perform the operation onlistener- listener for the result of the operation on primary, including current translog location and operation response and failure async refresh is performed on theprimaryshard according to theRequestrefresh policy
-
performOnPrimary
public static void performOnPrimary(BulkShardRequest request, IndexShard primary, UpdateHelper updateHelper, java.util.function.LongSupplier nowInMillisSupplier, MappingUpdatePerformer mappingUpdater, java.util.function.Consumer<ActionListener<java.lang.Void>> waitForMappingUpdate, ActionListener<TransportReplicationAction.PrimaryResult<BulkShardRequest,BulkShardResponse>> listener, ThreadPool threadPool) -
shardOperationOnReplica
public TransportWriteAction.WriteReplicaResult<BulkShardRequest> shardOperationOnReplica(BulkShardRequest request, IndexShard replica) throws java.lang.ExceptionDescription copied from class:TransportWriteActionCalled once per replica with a reference to the replica IndexShard to modify.- Specified by:
shardOperationOnReplicain classTransportWriteAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>- Parameters:
request- the request to the replica shardreplica- the replica shard to perform the operation on- Returns:
- the result of the operation on replica, including current translog location and operation response and failure
async refresh is performed on the
replicashard according to theReplicaRequestrefresh policy - Throws:
java.lang.Exception
-
performOnReplica
public static Translog.Location performOnReplica(BulkShardRequest request, IndexShard replica) throws java.lang.Exception- Throws:
java.lang.Exception
-