Module org.elasticsearch.server
Class TransportShardFlushAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<ShardFlushRequest,ReplicationResponse>
org.elasticsearch.action.support.replication.TransportReplicationAction<ShardFlushRequest,ShardFlushRequest,ReplicationResponse>
org.elasticsearch.action.admin.indices.flush.TransportShardFlushAction
public class TransportShardFlushAction
extends TransportReplicationAction<ShardFlushRequest,ShardFlushRequest,ReplicationResponse>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
TransportReplicationAction.ConcreteReplicaRequest<R extends TransportRequest>, TransportReplicationAction.ConcreteShardRequest<R extends TransportRequest>, TransportReplicationAction.PrimaryActionExecution, TransportReplicationAction.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>, TransportReplicationAction.ReplicaActionExecution, TransportReplicationAction.ReplicaResponse, TransportReplicationAction.ReplicaResult, TransportReplicationAction.ReplicasProxy, TransportReplicationAction.RetryOnReplicaException, TransportReplicationAction.SyncGlobalCheckpointAfterOperation -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final ActionType<ReplicationResponse> Fields inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
clusterService, executor, forceExecutionOnPrimary, indicesService, REPLICATION_INITIAL_RETRY_BACKOFF_BOUND, REPLICATION_RETRY_TIMEOUT, shardStateAction, threadPool, transportOptions, transportPrimaryAction, transportReplicaAction, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, logger, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportShardFlushAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, ProjectResolver projectResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected Tuple<ReplicationResponse, Exception> combineSplitResponses(ShardFlushRequest originalRequest, Map<ShardId, ShardFlushRequest> splitRequests, Map<ShardId, Tuple<ReplicationResponse, Exception>> responses) protected ReplicationResponseprotected voidshardOperationOnPrimary(ShardFlushRequest shardRequest, IndexShard primary, ActionListener<TransportReplicationAction.PrimaryResult<ShardFlushRequest, ReplicationResponse>> listener) Primary operation on node with primary copy.protected voidshardOperationOnReplica(ShardFlushRequest request, IndexShard replica, ActionListener<TransportReplicationAction.ReplicaResult> listener) Execute the specified replica operation.protected Map<ShardId, ShardFlushRequest> splitRequestOnPrimary(ShardFlushRequest request) During Resharding, we might need to split the primary request.Methods inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
acquirePrimaryOperationPermit, acquireReplicaOperationPermit, adaptResponse, checkOperationLimits, checkPrimaryLimits, checkReplicaLimits, doExecute, globalBlockLevel, handlePrimaryRequest, handleReplicaRequest, indexBlockLevel, newReplicasProxy, resolveRequest, retryPrimaryException, transportOptionsMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnly
-
Field Details
-
NAME
- See Also:
-
TYPE
-
-
Constructor Details
-
TransportShardFlushAction
@Inject public TransportShardFlushAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, ProjectResolver projectResolver)
-
-
Method Details
-
newResponseInstance
- Specified by:
newResponseInstancein classTransportReplicationAction<ShardFlushRequest,ShardFlushRequest, ReplicationResponse> - Throws:
IOException
-
shardOperationOnPrimary
protected void shardOperationOnPrimary(ShardFlushRequest shardRequest, IndexShard primary, ActionListener<TransportReplicationAction.PrimaryResult<ShardFlushRequest, ReplicationResponse>> listener) Description copied from class:TransportReplicationActionPrimary operation on node with primary copy.- Specified by:
shardOperationOnPrimaryin classTransportReplicationAction<ShardFlushRequest,ShardFlushRequest, ReplicationResponse> - Parameters:
shardRequest- the request to the primary shardprimary- the primary shard to perform the operation on
-
splitRequestOnPrimary
Description copied from class:TransportReplicationActionDuring Resharding, we might need to split the primary request. We are here because there was mismatch between the SplitShardCountSummary in the request and that on the primary shard node. We assume that the request is exactly 1 reshard split behind the current state.- Overrides:
splitRequestOnPrimaryin classTransportReplicationAction<ShardFlushRequest,ShardFlushRequest, ReplicationResponse>
-
combineSplitResponses
protected Tuple<ReplicationResponse,Exception> combineSplitResponses(ShardFlushRequest originalRequest, Map<ShardId, ShardFlushRequest> splitRequests, Map<ShardId, Tuple<ReplicationResponse, Exception>> responses) - Overrides:
combineSplitResponsesin classTransportReplicationAction<ShardFlushRequest,ShardFlushRequest, ReplicationResponse>
-
shardOperationOnReplica
protected void shardOperationOnReplica(ShardFlushRequest request, IndexShard replica, ActionListener<TransportReplicationAction.ReplicaResult> listener) Description copied from class:TransportReplicationActionExecute the specified replica operation. This is done under a permit fromIndexShard.acquireReplicaOperationPermit(long, long, long, ActionListener, Executor).- Specified by:
shardOperationOnReplicain classTransportReplicationAction<ShardFlushRequest,ShardFlushRequest, ReplicationResponse> - Parameters:
request- the request to the replica shardreplica- the replica shard to perform the operation on
-