Module org.elasticsearch.server
Class TransportPrevalidateShardPathAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<PrevalidateShardPathRequest,PrevalidateShardPathResponse>
org.elasticsearch.action.support.nodes.TransportNodesAction<PrevalidateShardPathRequest,PrevalidateShardPathResponse,NodePrevalidateShardPathRequest,NodePrevalidateShardPathResponse,Void>
org.elasticsearch.action.admin.cluster.node.shutdown.TransportPrevalidateShardPathAction
public class TransportPrevalidateShardPathAction
extends TransportNodesAction<PrevalidateShardPathRequest,PrevalidateShardPathResponse,NodePrevalidateShardPathRequest,NodePrevalidateShardPathResponse,Void>
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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final ActionType<PrevalidateShardPathResponse> Fields inherited from class org.elasticsearch.action.support.nodes.TransportNodesAction
clusterService, transportNodeActionFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportPrevalidateShardPathAction(ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, NodeEnvironment nodeEnv, Settings settings) -
Method Summary
Modifier and TypeMethodDescriptionprotected NodePrevalidateShardPathRequestprotected NodePrevalidateShardPathResponsenewNodeResponse(StreamInput in, DiscoveryNode node) protected PrevalidateShardPathResponsenewResponse(PrevalidateShardPathRequest request, List<NodePrevalidateShardPathResponse> nodeResponses, List<FailedNodeException> failures) Create a newTransportNodesAction.protected NodePrevalidateShardPathResponsenodeOperation(NodePrevalidateShardPathRequest request, Task task) Implements the request recipient logic.Methods inherited from class org.elasticsearch.action.support.nodes.TransportNodesAction
createActionContext, doExecute, newResponseAsync, nodeOperationAsync, resolveRequestMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, 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:TransportNodesActionCreate a newTransportNodesAction. This method is executed onTransportNodesAction.finalExecutor.- Specified by:
newResponsein classTransportNodesAction<PrevalidateShardPathRequest,PrevalidateShardPathResponse, NodePrevalidateShardPathRequest, NodePrevalidateShardPathResponse, 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.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) Description copied from class:TransportNodesActionImplements the request recipient logic. If access to the request listener is needed, overrideTransportNodesAction.nodeOperationAsync(TransportRequest, Task, ActionListener).
-