Package org.elasticsearch.gateway
Class TransportNodesListGatewayStartedShards
- java.lang.Object
-
- org.elasticsearch.action.support.TransportAction<Request,Response>
-
- org.elasticsearch.action.support.HandledTransportAction<NodesRequest,NodesResponse>
-
- org.elasticsearch.action.support.nodes.TransportNodesAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards,TransportNodesListGatewayStartedShards.NodeRequest,TransportNodesListGatewayStartedShards.NodeGatewayStartedShards>
-
- org.elasticsearch.gateway.TransportNodesListGatewayStartedShards
-
- All Implemented Interfaces:
AsyncShardFetch.Lister<TransportNodesListGatewayStartedShards.NodesGatewayStartedShards,TransportNodesListGatewayStartedShards.NodeGatewayStartedShards>
public class TransportNodesListGatewayStartedShards extends TransportNodesAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards,TransportNodesListGatewayStartedShards.NodeRequest,TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> implements AsyncShardFetch.Lister<TransportNodesListGatewayStartedShards.NodesGatewayStartedShards,TransportNodesListGatewayStartedShards.NodeGatewayStartedShards>
This transport action is used to fetch the shard version from each node during primary allocation inGatewayAllocator
. 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 Classes Modifier and Type Class Description static class
TransportNodesListGatewayStartedShards.NodeGatewayStartedShards
static class
TransportNodesListGatewayStartedShards.NodeRequest
static class
TransportNodesListGatewayStartedShards.NodesGatewayStartedShards
static class
TransportNodesListGatewayStartedShards.Request
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACTION_NAME
-
Fields inherited from class org.elasticsearch.action.support.nodes.TransportNodesAction
clusterService, nodeResponseClass, threadPool, transportService
-
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, logger, taskManager
-
-
Constructor Summary
Constructors Constructor Description TransportNodesListGatewayStartedShards(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, NodeEnvironment env, IndicesService indicesService, NamedXContentRegistry namedXContentRegistry)
-
Method Summary
Modifier and Type Method Description void
list(ShardId shardId, DiscoveryNode[] nodes, ActionListener<TransportNodesListGatewayStartedShards.NodesGatewayStartedShards> listener)
protected TransportNodesListGatewayStartedShards.NodeRequest
newNodeRequest(TransportNodesListGatewayStartedShards.Request request)
protected TransportNodesListGatewayStartedShards.NodeGatewayStartedShards
newNodeResponse()
protected TransportNodesListGatewayStartedShards.NodesGatewayStartedShards
newResponse(TransportNodesListGatewayStartedShards.Request request, java.util.List<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> responses, java.util.List<FailedNodeException> failures)
Create a newTransportNodesAction
(multi-node response).protected TransportNodesListGatewayStartedShards.NodeGatewayStartedShards
nodeOperation(TransportNodesListGatewayStartedShards.NodeRequest request)
-
Methods inherited from class org.elasticsearch.action.support.nodes.TransportNodesAction
doExecute, newResponse, nodeOperation, resolveRequest
-
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute
-
-
-
-
Field Detail
-
ACTION_NAME
public static final java.lang.String ACTION_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TransportNodesListGatewayStartedShards
@Inject public TransportNodesListGatewayStartedShards(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, NodeEnvironment env, IndicesService indicesService, NamedXContentRegistry namedXContentRegistry)
-
-
Method Detail
-
list
public void list(ShardId shardId, DiscoveryNode[] nodes, ActionListener<TransportNodesListGatewayStartedShards.NodesGatewayStartedShards> listener)
-
newNodeRequest
protected TransportNodesListGatewayStartedShards.NodeRequest newNodeRequest(TransportNodesListGatewayStartedShards.Request request)
-
newNodeResponse
protected TransportNodesListGatewayStartedShards.NodeGatewayStartedShards newNodeResponse()
-
newResponse
protected TransportNodesListGatewayStartedShards.NodesGatewayStartedShards newResponse(TransportNodesListGatewayStartedShards.Request request, java.util.List<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> responses, java.util.List<FailedNodeException> failures)
Description copied from class:TransportNodesAction
Create a newTransportNodesAction
(multi-node response).- Specified by:
newResponse
in classTransportNodesAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards,TransportNodesListGatewayStartedShards.NodeRequest,TransportNodesListGatewayStartedShards.NodeGatewayStartedShards>
- Parameters:
request
- The associated request.responses
- All successful node-level responses.failures
- All node-level failures.- Returns:
- Never
null
.
-
nodeOperation
protected TransportNodesListGatewayStartedShards.NodeGatewayStartedShards nodeOperation(TransportNodesListGatewayStartedShards.NodeRequest request)
-
-