Package org.opensearch.gateway
Class TransportNodesListGatewayStartedShards
java.lang.Object
org.opensearch.action.support.TransportAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards>
org.opensearch.action.support.HandledTransportAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards>
org.opensearch.action.support.nodes.TransportNodesAction<TransportNodesListGatewayStartedShards.Request,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards,TransportNodesListGatewayStartedShards.NodeRequest,TransportNodesListGatewayStartedShards.NodeGatewayStartedShards>
org.opensearch.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 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.- Opensearch.internal:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The response.static class
The request.static class
The nodes response.static class
The nodes request. -
Field Summary
FieldsFields inherited from class org.opensearch.action.support.nodes.TransportNodesAction
clusterService, nodeResponseClass, threadPool, transportNodeAction, transportService
Fields inherited from class org.opensearch.action.support.TransportAction
actionName, logger, taskManager
-
Constructor Summary
ConstructorsConstructorDescriptionTransportNodesListGatewayStartedShards
(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, NodeEnvironment env, IndicesService indicesService, org.opensearch.core.xcontent.NamedXContentRegistry namedXContentRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoid
list
(Map<org.opensearch.core.index.shard.ShardId, ShardAttributes> shardAttributesMap, DiscoveryNode[] nodes, org.opensearch.core.action.ActionListener<TransportNodesListGatewayStartedShards.NodesGatewayStartedShards> listener) newNodeResponse
(org.opensearch.core.common.io.stream.StreamInput in) newResponse
(TransportNodesListGatewayStartedShards.Request request, List<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> responses, List<FailedNodeException> failures) Create a newTransportNodesAction
(multi-node response).Methods inherited from class org.opensearch.action.support.nodes.TransportNodesAction
doExecute, getTransportNodeAction, newResponse, nodeOperation, resolveRequest
Methods inherited from class org.opensearch.action.support.TransportAction
execute, execute, execute
-
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, org.opensearch.core.xcontent.NamedXContentRegistry namedXContentRegistry)
-
-
Method Details
-
list
public void list(Map<org.opensearch.core.index.shard.ShardId, ShardAttributes> shardAttributesMap, DiscoveryNode[] nodes, org.opensearch.core.action.ActionListener<TransportNodesListGatewayStartedShards.NodesGatewayStartedShards> listener) -
newNodeRequest
protected TransportNodesListGatewayStartedShards.NodeRequest newNodeRequest(TransportNodesListGatewayStartedShards.Request request) -
newNodeResponse
protected TransportNodesListGatewayStartedShards.NodeGatewayStartedShards newNodeResponse(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Specified by:
newNodeResponse
in classTransportNodesAction<TransportNodesListGatewayStartedShards.Request,
TransportNodesListGatewayStartedShards.NodesGatewayStartedShards, TransportNodesListGatewayStartedShards.NodeRequest, TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> - Throws:
IOException
-
newResponse
protected TransportNodesListGatewayStartedShards.NodesGatewayStartedShards newResponse(TransportNodesListGatewayStartedShards.Request request, List<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> responses, 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)
-