Module org.elasticsearch.server
Class TransportIndicesSegmentsAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
 
org.elasticsearch.action.support.HandledTransportAction<Request,Response>
 
org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction<IndicesSegmentsRequest,IndicesSegmentResponse,ShardSegments>
  
org.elasticsearch.action.admin.indices.segments.TransportIndicesSegmentsAction
public class TransportIndicesSegmentsAction
extends TransportBroadcastByNodeAction<IndicesSegmentsRequest,IndicesSegmentResponse,ShardSegments>  
- 
Nested Class SummaryNested classes/interfaces inherited from class org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeActionTransportBroadcastByNodeAction.AsyncAction, TransportBroadcastByNodeAction.EmptyResult, TransportBroadcastByNodeAction.NodeRequest
- 
Field SummaryFields inherited from class org.elasticsearch.action.support.TransportActionactionName, logger, taskManager
- 
Constructor SummaryConstructorsConstructorDescriptionTransportIndicesSegmentsAction(ClusterService clusterService, TransportService transportService, IndicesService indicesService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected ClusterBlockExceptioncheckGlobalBlock(ClusterState state, IndicesSegmentsRequest request) Executes a global block check before polling the cluster state.protected ClusterBlockExceptioncheckRequestBlock(ClusterState state, IndicesSegmentsRequest countRequest, String[] concreteIndices) Executes a global request-level check before polling the cluster state.protected IndicesSegmentResponsenewResponse(IndicesSegmentsRequest request, int totalShards, int successfulShards, int failedShards, List<ShardSegments> results, List<DefaultShardOperationFailedException> shardFailures, ClusterState clusterState) Creates a new response to the underlying request.protected IndicesSegmentsRequestDeserialize a request from an input streamprotected ShardSegmentsDeserialize a shard-level result from an input streamprotected voidshardOperation(IndicesSegmentsRequest request, ShardRouting shardRouting, Task task, ActionListener<ShardSegments> listener) Executes the shard-level operation.protected ShardsIteratorshards(ClusterState clusterState, IndicesSegmentsRequest request, String[] concreteIndices) Segments goes across *all* active shards.Methods inherited from class org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeActiondoExecute, resolveConcreteIndexNamesMethods inherited from class org.elasticsearch.action.support.TransportActionexecute
- 
Constructor Details- 
TransportIndicesSegmentsAction@Inject public TransportIndicesSegmentsAction(ClusterService clusterService, TransportService transportService, IndicesService indicesService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) 
 
- 
- 
Method Details- 
shardsprotected ShardsIterator shards(ClusterState clusterState, IndicesSegmentsRequest request, String[] concreteIndices) Segments goes across *all* active shards.- Specified by:
- shardsin class- TransportBroadcastByNodeAction<IndicesSegmentsRequest,- IndicesSegmentResponse, - ShardSegments> 
- Parameters:
- clusterState- the cluster state
- request- the underlying request
- concreteIndices- the concrete indices on which to execute the operation
- Returns:
- the shards on which to execute the operation
 
- 
checkGlobalBlockprotected ClusterBlockException checkGlobalBlock(ClusterState state, IndicesSegmentsRequest request) Description copied from class:TransportBroadcastByNodeActionExecutes a global block check before polling the cluster state.- Specified by:
- checkGlobalBlockin class- TransportBroadcastByNodeAction<IndicesSegmentsRequest,- IndicesSegmentResponse, - ShardSegments> 
- Parameters:
- state- the cluster state
- request- the underlying request
- Returns:
- a non-null exception if the operation is blocked
 
- 
checkRequestBlockprotected ClusterBlockException checkRequestBlock(ClusterState state, IndicesSegmentsRequest countRequest, String[] concreteIndices) Description copied from class:TransportBroadcastByNodeActionExecutes a global request-level check before polling the cluster state.- Specified by:
- checkRequestBlockin class- TransportBroadcastByNodeAction<IndicesSegmentsRequest,- IndicesSegmentResponse, - ShardSegments> 
- Parameters:
- state- the cluster state
- countRequest- the underlying request
- concreteIndices- the concrete indices on which to execute the operation
- Returns:
- a non-null exception if the operation if blocked
 
- 
readShardResultDescription copied from class:TransportBroadcastByNodeActionDeserialize a shard-level result from an input stream- Specified by:
- readShardResultin class- TransportBroadcastByNodeAction<IndicesSegmentsRequest,- IndicesSegmentResponse, - ShardSegments> 
- Parameters:
- in- input stream
- Returns:
- a deserialized shard-level result
- Throws:
- IOException
 
- 
newResponseprotected IndicesSegmentResponse newResponse(IndicesSegmentsRequest request, int totalShards, int successfulShards, int failedShards, List<ShardSegments> results, List<DefaultShardOperationFailedException> shardFailures, ClusterState clusterState) Description copied from class:TransportBroadcastByNodeActionCreates a new response to the underlying request.- Specified by:
- newResponsein class- TransportBroadcastByNodeAction<IndicesSegmentsRequest,- IndicesSegmentResponse, - ShardSegments> 
- Parameters:
- request- the underlying request
- totalShards- the total number of shards considered for execution of the operation
- successfulShards- the total number of shards for which execution of the operation was successful
- failedShards- the total number of shards for which execution of the operation failed
- results- the per-node aggregated shard-level results
- shardFailures- the exceptions corresponding to shard operation failures
- clusterState- the cluster state
- Returns:
- the response
 
- 
readRequestFromDescription copied from class:TransportBroadcastByNodeActionDeserialize a request from an input stream- Specified by:
- readRequestFromin class- TransportBroadcastByNodeAction<IndicesSegmentsRequest,- IndicesSegmentResponse, - ShardSegments> 
- Parameters:
- in- input stream
- Returns:
- a de-serialized request
- Throws:
- IOException
 
- 
shardOperationprotected void shardOperation(IndicesSegmentsRequest request, ShardRouting shardRouting, Task task, ActionListener<ShardSegments> 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 class- TransportBroadcastByNodeAction<IndicesSegmentsRequest,- IndicesSegmentResponse, - ShardSegments> 
- Parameters:
- request- the node-level request
- shardRouting- the shard on which to execute the operation
- task- the task for this node-level request
- listener- the listener to notify with the result of the shard-level operation
 
 
-