Module org.elasticsearch.server
Class TransportPrevalidateShardPathAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<NodesRequest,NodesResponse>
org.elasticsearch.action.support.nodes.TransportNodesAction<PrevalidateShardPathRequest,PrevalidateShardPathResponse,NodePrevalidateShardPathRequest,NodePrevalidateShardPathResponse>
org.elasticsearch.action.admin.cluster.node.shutdown.TransportPrevalidateShardPathAction
public class TransportPrevalidateShardPathAction
extends TransportNodesAction<PrevalidateShardPathRequest,PrevalidateShardPathResponse,NodePrevalidateShardPathRequest,NodePrevalidateShardPathResponse>
Given a set of shard IDs, checks which of those shards have a matching directory in the local data path.
This is used by
PrevalidateNodeRemovalAction
to find out whether a node may contain some copy
of a specific shard. The response contains a subset of the request shard IDs which are in the cluster state
of this node and have a matching shard path on the local data path.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final ActionType<PrevalidateShardPathResponse>
Fields inherited from class org.elasticsearch.action.support.nodes.TransportNodesAction
clusterService, transportNodeAction
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager
-
Constructor Summary
ConstructorDescriptionTransportPrevalidateShardPathAction
(ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, NodeEnvironment nodeEnv, Settings settings) -
Method Summary
Modifier and TypeMethodDescriptionprotected NodePrevalidateShardPathRequest
protected NodePrevalidateShardPathResponse
newNodeResponse
(StreamInput in, DiscoveryNode node) protected PrevalidateShardPathResponse
newResponse
(PrevalidateShardPathRequest request, List<NodePrevalidateShardPathResponse> nodeResponses, List<FailedNodeException> failures) Create a newTransportNodesAction
.protected NodePrevalidateShardPathResponse
nodeOperation
(NodePrevalidateShardPathRequest request, Task task) Methods inherited from class org.elasticsearch.action.support.nodes.TransportNodesAction
doExecute, newResponseAsync, resolveRequest
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, localOnly
-
Field Details
-
ACTION_NAME
- See Also:
-
TYPE
-
-
Constructor Details
-
TransportPrevalidateShardPathAction
@Inject public TransportPrevalidateShardPathAction(ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, NodeEnvironment nodeEnv, Settings settings)
-
-
Method Details
-
newResponse
protected PrevalidateShardPathResponse newResponse(PrevalidateShardPathRequest request, List<NodePrevalidateShardPathResponse> nodeResponses, List<FailedNodeException> failures) Description copied from class:TransportNodesAction
Create a newTransportNodesAction
. This method is executed onTransportNodesAction.finalExecutor
.- Specified by:
newResponse
in classTransportNodesAction<PrevalidateShardPathRequest,
PrevalidateShardPathResponse, NodePrevalidateShardPathRequest, NodePrevalidateShardPathResponse> - Parameters:
request
- The request whose response we are constructing.TransportNodesAction
may 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.nodeResponses
- All successful node-level responses.failures
- All node-level failures.- Returns:
- Never
null
.
-
newNodeRequest
-
newNodeResponse
protected NodePrevalidateShardPathResponse newNodeResponse(StreamInput in, DiscoveryNode node) throws IOException -
nodeOperation
protected NodePrevalidateShardPathResponse nodeOperation(NodePrevalidateShardPathRequest request, Task task)
-