public class TransportShardBulkAction extends TransportWriteAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>
TransportWriteAction.WritePrimaryResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>,Response extends ReplicationResponse & WriteResponse>, TransportWriteAction.WriteReplicaResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>>
TransportReplicationAction.ConcreteShardRequest<R extends ReplicationRequest<?>>, TransportReplicationAction.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>, TransportReplicationAction.ReplicaResult, TransportReplicationAction.RetryOnReplicaException
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_NAME |
clusterService
actionName, indexNameExpressionResolver, taskManager, threadPool
deprecationLogger, logger, settings
Constructor and Description |
---|
TransportShardBulkAction(Settings settings,
TransportService transportService,
ClusterService clusterService,
IndicesService indicesService,
ThreadPool threadPool,
ShardStateAction shardStateAction,
MappingUpdatedAction mappingUpdatedAction,
UpdateHelper updateHelper,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) |
Modifier and Type | Method and Description |
---|---|
static Engine.DeleteResult |
executeDeleteRequestOnPrimary(DeleteRequest request,
IndexShard primary,
MappingUpdatedAction mappingUpdatedAction) |
static Engine.DeleteResult |
executeDeleteRequestOnReplica(DeleteRequest request,
IndexShard replica) |
static Engine.IndexResult |
executeIndexRequestOnPrimary(IndexRequest request,
IndexShard primary,
MappingUpdatedAction mappingUpdatedAction)
Executes index operation on primary shard after updates mapping if dynamic mappings are found
|
static Engine.IndexResult |
executeIndexRequestOnReplica(IndexRequest request,
IndexShard replica)
Execute the given
IndexRequest on a replica shard, throwing a
RetryOnReplicaException if the operation needs to be re-tried. |
protected BulkShardResponse |
newResponseInstance() |
protected boolean |
resolveIndex()
True if provided index should be resolved when resolving request
|
TransportWriteAction.WritePrimaryResult<BulkShardRequest,BulkShardResponse> |
shardOperationOnPrimary(BulkShardRequest request,
IndexShard primary)
Called on the primary with a reference to the primary IndexShard to modify.
|
TransportWriteAction.WriteReplicaResult<BulkShardRequest> |
shardOperationOnReplica(BulkShardRequest request,
IndexShard replica)
Called once per replica with a reference to the replica IndexShard to modify.
|
protected TransportRequestOptions |
transportOptions() |
globalBlockLevel, indexBlockLevel
doExecute, doExecute, resolveRequest, retryPrimaryException, shouldExecuteReplication
execute, execute, execute, execute
logDeprecatedSetting, logRemovedSetting, nodeName
public static final java.lang.String ACTION_NAME
@Inject public TransportShardBulkAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, MappingUpdatedAction mappingUpdatedAction, UpdateHelper updateHelper, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver)
protected TransportRequestOptions transportOptions()
transportOptions
in class TransportReplicationAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>
protected BulkShardResponse newResponseInstance()
newResponseInstance
in class TransportReplicationAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>
protected boolean resolveIndex()
TransportReplicationAction
resolveIndex
in class TransportReplicationAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>
public TransportWriteAction.WritePrimaryResult<BulkShardRequest,BulkShardResponse> shardOperationOnPrimary(BulkShardRequest request, IndexShard primary) throws java.lang.Exception
TransportWriteAction
shardOperationOnPrimary
in class TransportWriteAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>
request
- the request to the primary shardprimary
- the primary shard to perform the operation onprimary
shard according to the Request
refresh policyjava.lang.Exception
public TransportWriteAction.WriteReplicaResult<BulkShardRequest> shardOperationOnReplica(BulkShardRequest request, IndexShard replica) throws java.lang.Exception
TransportWriteAction
shardOperationOnReplica
in class TransportWriteAction<BulkShardRequest,BulkShardRequest,BulkShardResponse>
request
- the request to the replica shardreplica
- the replica shard to perform the operation onreplica
shard according to the ReplicaRequest
refresh policyjava.lang.Exception
public static Engine.IndexResult executeIndexRequestOnReplica(IndexRequest request, IndexShard replica) throws java.io.IOException
IndexRequest
on a replica shard, throwing a
RetryOnReplicaException
if the operation needs to be re-tried.java.io.IOException
public static Engine.IndexResult executeIndexRequestOnPrimary(IndexRequest request, IndexShard primary, MappingUpdatedAction mappingUpdatedAction) throws java.lang.Exception
java.lang.Exception
public static Engine.DeleteResult executeDeleteRequestOnPrimary(DeleteRequest request, IndexShard primary, MappingUpdatedAction mappingUpdatedAction) throws java.lang.Exception
java.lang.Exception
public static Engine.DeleteResult executeDeleteRequestOnReplica(DeleteRequest request, IndexShard replica) throws java.io.IOException
java.io.IOException