Module org.elasticsearch.server
Class TransportFieldUsageAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<FieldUsageStatsRequest,FieldUsageStatsResponse>
org.elasticsearch.action.support.HandledTransportAction<FieldUsageStatsRequest,FieldUsageStatsResponse>
org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction<FieldUsageStatsRequest,FieldUsageStatsResponse,FieldUsageShardResponse>
org.elasticsearch.action.admin.indices.stats.TransportFieldUsageAction
public class TransportFieldUsageAction
extends TransportBroadcastByNodeAction<FieldUsageStatsRequest,FieldUsageStatsResponse,FieldUsageShardResponse>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction
TransportBroadcastByNodeAction.EmptyResult, TransportBroadcastByNodeAction.NodeResponse, TransportBroadcastByNodeAction.ResponseFactory<Response,ShardOperationResult> -
Field Summary
Fields inherited from class org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction
clusterService, indexNameExpressionResolver, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportFieldUsageAction(ClusterService clusterService, TransportService transportService, IndicesService indexServices, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockExceptioncheckGlobalBlock(ClusterState state, FieldUsageStatsRequest request) Executes a global block check before polling the cluster state.protected ClusterBlockExceptioncheckRequestBlock(ClusterState state, FieldUsageStatsRequest request, String[] concreteIndices) Executes a global request-level check before polling the cluster state.protected TransportBroadcastByNodeAction.ResponseFactory<FieldUsageStatsResponse, FieldUsageShardResponse> getResponseFactory(FieldUsageStatsRequest request, ClusterState clusterState) Create a response factory based on the requst and the cluster state captured at the time the request was handled.protected FieldUsageStatsRequestDeserialize a request from an input streamprotected FieldUsageShardResponseDeserialize a shard-level result from an input streamprotected voidshardOperation(FieldUsageStatsRequest request, ShardRouting shardRouting, Task task, ActionListener<FieldUsageShardResponse> listener) Executes the shard-level operation.protected ShardsIteratorshards(ClusterState clusterState, FieldUsageStatsRequest request, String[] concreteIndices) Determines the shards on which this operation will be executed on.Methods inherited from class org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction
doExecute, resolveConcreteIndexNamesMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnly
-
Constructor Details
-
TransportFieldUsageAction
@Inject public TransportFieldUsageAction(ClusterService clusterService, TransportService transportService, IndicesService indexServices, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver)
-
-
Method Details
-
readShardResult
Description copied from class:TransportBroadcastByNodeActionDeserialize a shard-level result from an input stream- Specified by:
readShardResultin classTransportBroadcastByNodeAction<FieldUsageStatsRequest,FieldUsageStatsResponse, FieldUsageShardResponse> - Parameters:
in- input stream- Returns:
- a deserialized shard-level result
- Throws:
IOException
-
getResponseFactory
protected TransportBroadcastByNodeAction.ResponseFactory<FieldUsageStatsResponse,FieldUsageShardResponse> getResponseFactory(FieldUsageStatsRequest request, ClusterState clusterState) Description copied from class:TransportBroadcastByNodeActionCreate a response factory based on the requst and the cluster state captured at the time the request was handled. Implementations must avoid capturing the full cluster state if possible. -
readRequestFrom
Description copied from class:TransportBroadcastByNodeActionDeserialize a request from an input stream- Specified by:
readRequestFromin classTransportBroadcastByNodeAction<FieldUsageStatsRequest,FieldUsageStatsResponse, FieldUsageShardResponse> - Parameters:
in- input stream- Returns:
- a de-serialized request
- Throws:
IOException
-
shardOperation
protected void shardOperation(FieldUsageStatsRequest request, ShardRouting shardRouting, Task task, ActionListener<FieldUsageShardResponse> listener) Description copied from class:TransportBroadcastByNodeActionExecutes the shard-level operation. This method is called once per shard serially on the receiving node. This method should not throw an exception, but pass the exception to the listener instead.- Specified by:
shardOperationin classTransportBroadcastByNodeAction<FieldUsageStatsRequest,FieldUsageStatsResponse, FieldUsageShardResponse> - Parameters:
request- the node-level requestshardRouting- the shard on which to execute the operationtask- the task for this node-level requestlistener- the listener to notify with the result of the shard-level operation
-
shards
protected ShardsIterator shards(ClusterState clusterState, FieldUsageStatsRequest request, String[] concreteIndices) Description copied from class:TransportBroadcastByNodeActionDetermines the shards on which this operation will be executed on. The operation is executed once per shard.- Specified by:
shardsin classTransportBroadcastByNodeAction<FieldUsageStatsRequest,FieldUsageStatsResponse, FieldUsageShardResponse> - Parameters:
clusterState- the cluster staterequest- the underlying requestconcreteIndices- the concrete indices on which to execute the operation- Returns:
- the shards on which to execute the operation
-
checkGlobalBlock
protected ClusterBlockException checkGlobalBlock(ClusterState state, FieldUsageStatsRequest request) Description copied from class:TransportBroadcastByNodeActionExecutes a global block check before polling the cluster state.- Specified by:
checkGlobalBlockin classTransportBroadcastByNodeAction<FieldUsageStatsRequest,FieldUsageStatsResponse, FieldUsageShardResponse> - Parameters:
state- the cluster staterequest- the underlying request- Returns:
- a non-null exception if the operation is blocked
-
checkRequestBlock
protected ClusterBlockException checkRequestBlock(ClusterState state, FieldUsageStatsRequest request, String[] concreteIndices) Description copied from class:TransportBroadcastByNodeActionExecutes a global request-level check before polling the cluster state.- Specified by:
checkRequestBlockin classTransportBroadcastByNodeAction<FieldUsageStatsRequest,FieldUsageStatsResponse, FieldUsageShardResponse> - Parameters:
state- the cluster staterequest- the underlying requestconcreteIndices- the concrete indices on which to execute the operation- Returns:
- a non-null exception if the operation if blocked
-