Module org.elasticsearch.server
Package org.elasticsearch.gateway
Class TransportNodesListGatewayStartedShards
java.lang.Object
org.elasticsearch.action.support.TransportAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards>
org.elasticsearch.action.support.nodes.TransportNodesAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards,TransportNodesListGatewayStartedShards.NodeRequest,TransportNodesListGatewayStartedShards.NodeGatewayStartedShards,Void>
org.elasticsearch.gateway.TransportNodesListGatewayStartedShards
public class TransportNodesListGatewayStartedShards
extends TransportNodesAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards,TransportNodesListGatewayStartedShards.NodeRequest,TransportNodesListGatewayStartedShards.NodeGatewayStartedShards,Void>
This transport action is used to fetch the shard version from each node during primary allocation in
GatewayAllocator.
We use this to find out which node holds the latest shard version and which of them used to be a primary in order to allocate
shards after node or cluster restarts.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic class -
Field Summary
FieldsFields inherited from class org.elasticsearch.action.support.nodes.TransportNodesAction
clusterService, transportNodeAction, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportNodesListGatewayStartedShards(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, NodeEnvironment env, IndicesService indicesService, NamedXContentRegistry namedXContentRegistry) -
Method Summary
Modifier and TypeMethodDescriptionnewNodeResponse(StreamInput in, DiscoveryNode node) newResponse(TransportNodesListGatewayStartedShards.Request request, List<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> responses, List<FailedNodeException> failures) Create a newTransportNodesAction.nodeOperation(TransportNodesListGatewayStartedShards.NodeRequest request, Task task) Implements the request recipient logic.Methods inherited from class org.elasticsearch.action.support.nodes.TransportNodesAction
createActionContext, doExecute, newResponseAsync, nodeOperationAsync, resolveRequest, sendLegacyNodesRequestHeader, skipLegacyNodesRequestHeaderMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnly
-
Field Details
-
ACTION_NAME
- See Also:
-
TYPE
public static final ActionType<TransportNodesListGatewayStartedShards.NodesGatewayStartedShards> TYPE
-
-
Constructor Details
-
TransportNodesListGatewayStartedShards
@Inject public TransportNodesListGatewayStartedShards(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, NodeEnvironment env, IndicesService indicesService, NamedXContentRegistry namedXContentRegistry)
-
-
Method Details
-
newNodeRequest
protected TransportNodesListGatewayStartedShards.NodeRequest newNodeRequest(TransportNodesListGatewayStartedShards.Request request) -
newNodeResponse
protected TransportNodesListGatewayStartedShards.NodeGatewayStartedShards newNodeResponse(StreamInput in, DiscoveryNode node) throws IOException - Specified by:
newNodeResponsein classTransportNodesAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards, TransportNodesListGatewayStartedShards.NodeRequest, TransportNodesListGatewayStartedShards.NodeGatewayStartedShards, Void> - Throws:
IOException
-
newResponse
protected TransportNodesListGatewayStartedShards.NodesGatewayStartedShards newResponse(TransportNodesListGatewayStartedShards.Request request, List<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> responses, List<FailedNodeException> failures) Description copied from class:TransportNodesActionCreate a newTransportNodesAction. This method is executed onTransportNodesAction.finalExecutor.- Specified by:
newResponsein classTransportNodesAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards, TransportNodesListGatewayStartedShards.NodeRequest, TransportNodesListGatewayStartedShards.NodeGatewayStartedShards, Void> - Parameters:
request- The request whose response we are constructing.TransportNodesActionmay have already released all its references to this object before calling this method, so it's up to individual implementations to retain their own reference to the request if still needed here.responses- All successful node-level responses.failures- All node-level failures.- Returns:
- Never
null.
-
nodeOperation
protected TransportNodesListGatewayStartedShards.NodeGatewayStartedShards nodeOperation(TransportNodesListGatewayStartedShards.NodeRequest request, Task task) Description copied from class:TransportNodesActionImplements the request recipient logic. If access to the request listener is needed, overrideTransportNodesAction.nodeOperationAsync(TransportRequest, Task, ActionListener).
-