Class TransportIndicesSegmentsAction
java.lang.Object
org.opensearch.action.support.TransportAction<IndicesSegmentsRequest,IndicesSegmentResponse>
org.opensearch.action.support.HandledTransportAction<IndicesSegmentsRequest,IndicesSegmentResponse>
org.opensearch.action.support.broadcast.node.TransportBroadcastByNodeAction<IndicesSegmentsRequest,IndicesSegmentResponse,ShardSegments>
org.opensearch.action.admin.indices.segments.TransportIndicesSegmentsAction
public class TransportIndicesSegmentsAction
extends TransportBroadcastByNodeAction<IndicesSegmentsRequest,IndicesSegmentResponse,ShardSegments>
Transport response for retrieving indices segment information
- Opensearch.internal:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensearch.action.support.broadcast.node.TransportBroadcastByNodeAction
TransportBroadcastByNodeAction.AsyncAction, TransportBroadcastByNodeAction.EmptyResult, TransportBroadcastByNodeAction.NodeRequest
-
Field Summary
Fields inherited from class org.opensearch.action.support.TransportAction
actionName, logger, taskManager
-
Constructor Summary
ConstructorDescriptionTransportIndicesSegmentsAction
(ClusterService clusterService, TransportService transportService, IndicesService indicesService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockException
checkGlobalBlock
(ClusterState state, IndicesSegmentsRequest request) Executes a global block check before polling the cluster state.protected ClusterBlockException
checkRequestBlock
(ClusterState state, IndicesSegmentsRequest countRequest, String[] concreteIndices) Executes a global request-level check before polling the cluster state.protected IndicesSegmentResponse
newResponse
(IndicesSegmentsRequest request, int totalShards, int successfulShards, int failedShards, List<ShardSegments> results, List<org.opensearch.core.action.support.DefaultShardOperationFailedException> shardFailures, ClusterState clusterState) Creates a new response to the underlying request.protected IndicesSegmentsRequest
readRequestFrom
(org.opensearch.core.common.io.stream.StreamInput in) Deserialize a request from an input streamprotected ShardSegments
readShardResult
(org.opensearch.core.common.io.stream.StreamInput in) Deserialize a shard-level result from an input streamprotected ShardSegments
shardOperation
(IndicesSegmentsRequest request, ShardRouting shardRouting) Executes the shard-level operation.protected ShardsIterator
shards
(ClusterState clusterState, IndicesSegmentsRequest request, String[] concreteIndices) Segments goes across *all* active shards.Methods inherited from class org.opensearch.action.support.broadcast.node.TransportBroadcastByNodeAction
doExecute, getShardRoutingsFromInputStream, resolveConcreteIndexNames
Methods inherited from class org.opensearch.action.support.TransportAction
execute, execute, execute
-
Constructor Details
-
TransportIndicesSegmentsAction
@Inject public TransportIndicesSegmentsAction(ClusterService clusterService, TransportService transportService, IndicesService indicesService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver)
-
-
Method Details
-
shards
protected ShardsIterator shards(ClusterState clusterState, IndicesSegmentsRequest request, String[] concreteIndices) Segments goes across *all* active shards.- Specified by:
shards
in classTransportBroadcastByNodeAction<IndicesSegmentsRequest,
IndicesSegmentResponse, ShardSegments> - 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, IndicesSegmentsRequest request) Description copied from class:TransportBroadcastByNodeAction
Executes a global block check before polling the cluster state.- Specified by:
checkGlobalBlock
in classTransportBroadcastByNodeAction<IndicesSegmentsRequest,
IndicesSegmentResponse, ShardSegments> - Parameters:
state
- the cluster staterequest
- the underlying request- Returns:
- a non-null exception if the operation is blocked
-
checkRequestBlock
protected ClusterBlockException checkRequestBlock(ClusterState state, IndicesSegmentsRequest countRequest, String[] concreteIndices) Description copied from class:TransportBroadcastByNodeAction
Executes a global request-level check before polling the cluster state.- Specified by:
checkRequestBlock
in classTransportBroadcastByNodeAction<IndicesSegmentsRequest,
IndicesSegmentResponse, ShardSegments> - Parameters:
state
- the cluster statecountRequest
- the underlying requestconcreteIndices
- the concrete indices on which to execute the operation- Returns:
- a non-null exception if the operation if blocked
-
readShardResult
protected ShardSegments readShardResult(org.opensearch.core.common.io.stream.StreamInput in) throws IOException Description copied from class:TransportBroadcastByNodeAction
Deserialize a shard-level result from an input stream- Specified by:
readShardResult
in classTransportBroadcastByNodeAction<IndicesSegmentsRequest,
IndicesSegmentResponse, ShardSegments> - Parameters:
in
- input stream- Returns:
- a deserialized shard-level result
- Throws:
IOException
-
newResponse
protected IndicesSegmentResponse newResponse(IndicesSegmentsRequest request, int totalShards, int successfulShards, int failedShards, List<ShardSegments> results, List<org.opensearch.core.action.support.DefaultShardOperationFailedException> shardFailures, ClusterState clusterState) Description copied from class:TransportBroadcastByNodeAction
Creates a new response to the underlying request.- Specified by:
newResponse
in classTransportBroadcastByNodeAction<IndicesSegmentsRequest,
IndicesSegmentResponse, ShardSegments> - Parameters:
request
- the underlying requesttotalShards
- the total number of shards considered for execution of the operationsuccessfulShards
- the total number of shards for which execution of the operation was successfulfailedShards
- the total number of shards for which execution of the operation failedresults
- the per-node aggregated shard-level resultsshardFailures
- the exceptions corresponding to shard operation failuresclusterState
- the cluster state- Returns:
- the response
-
readRequestFrom
protected IndicesSegmentsRequest readRequestFrom(org.opensearch.core.common.io.stream.StreamInput in) throws IOException Description copied from class:TransportBroadcastByNodeAction
Deserialize a request from an input stream- Specified by:
readRequestFrom
in classTransportBroadcastByNodeAction<IndicesSegmentsRequest,
IndicesSegmentResponse, ShardSegments> - Parameters:
in
- input stream- Returns:
- a de-serialized request
- Throws:
IOException
-
shardOperation
Description copied from class:TransportBroadcastByNodeAction
Executes the shard-level operation. This method is called once per shard serially on the receiving node.- Specified by:
shardOperation
in classTransportBroadcastByNodeAction<IndicesSegmentsRequest,
IndicesSegmentResponse, ShardSegments> - Parameters:
request
- the node-level requestshardRouting
- the shard on which to execute the operation- Returns:
- the result of the shard-level operation for the shard
-