public class TransportUpgradeAction extends TransportBroadcastByNodeAction<UpgradeRequest,UpgradeResponse,org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult>
TransportBroadcastByNodeAction.AsyncAction, TransportBroadcastByNodeAction.EmptyResult, TransportBroadcastByNodeAction.NodeRequest
actionName, indexNameExpressionResolver, taskManager, threadPool
deprecationLogger, logger, settings
Constructor and Description |
---|
TransportUpgradeAction(Settings settings,
ThreadPool threadPool,
ClusterService clusterService,
TransportService transportService,
IndicesService indicesService,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver,
TransportUpgradeSettingsAction upgradeSettingsAction) |
Modifier and Type | Method and Description |
---|---|
protected ClusterBlockException |
checkGlobalBlock(ClusterState state,
UpgradeRequest request)
Executes a global block check before polling the cluster state.
|
protected ClusterBlockException |
checkRequestBlock(ClusterState state,
UpgradeRequest request,
java.lang.String[] concreteIndices)
Executes a global request-level check before polling the cluster state.
|
protected void |
doExecute(Task task,
UpgradeRequest request,
ActionListener<UpgradeResponse> listener) |
protected UpgradeResponse |
newResponse(UpgradeRequest request,
int totalShards,
int successfulShards,
int failedShards,
java.util.List<org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult> shardUpgradeResults,
java.util.List<ShardOperationFailedException> shardFailures,
ClusterState clusterState)
Creates a new response to the underlying request.
|
protected UpgradeRequest |
readRequestFrom(StreamInput in)
Deserialize a request from an input stream
|
protected org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult |
readShardResult(StreamInput in)
Deserialize a shard-level result from an input stream
|
protected org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult |
shardOperation(UpgradeRequest request,
ShardRouting shardRouting)
Executes the shard-level operation.
|
protected ShardsIterator |
shards(ClusterState clusterState,
UpgradeRequest request,
java.lang.String[] concreteIndices)
The upgrade request works against *all* shards.
|
doExecute
execute, execute, execute, execute
logDeprecatedSetting, logRemovedSetting, nodeName
@Inject public TransportUpgradeAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, IndicesService indicesService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, TransportUpgradeSettingsAction upgradeSettingsAction)
protected UpgradeResponse newResponse(UpgradeRequest request, int totalShards, int successfulShards, int failedShards, java.util.List<org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult> shardUpgradeResults, java.util.List<ShardOperationFailedException> shardFailures, ClusterState clusterState)
TransportBroadcastByNodeAction
newResponse
in class TransportBroadcastByNodeAction<UpgradeRequest,UpgradeResponse,org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult>
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 failedshardUpgradeResults
- the per-node aggregated shard-level resultsshardFailures
- the exceptions corresponding to shard operationa failuresclusterState
- the cluster stateprotected org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult shardOperation(UpgradeRequest request, ShardRouting shardRouting) throws java.io.IOException
TransportBroadcastByNodeAction
shardOperation
in class TransportBroadcastByNodeAction<UpgradeRequest,UpgradeResponse,org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult>
request
- the node-level requestshardRouting
- the shard on which to execute the operationjava.io.IOException
protected org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult readShardResult(StreamInput in) throws java.io.IOException
TransportBroadcastByNodeAction
readShardResult
in class TransportBroadcastByNodeAction<UpgradeRequest,UpgradeResponse,org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult>
in
- input streamjava.io.IOException
protected UpgradeRequest readRequestFrom(StreamInput in) throws java.io.IOException
TransportBroadcastByNodeAction
readRequestFrom
in class TransportBroadcastByNodeAction<UpgradeRequest,UpgradeResponse,org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult>
in
- input streamjava.io.IOException
protected ShardsIterator shards(ClusterState clusterState, UpgradeRequest request, java.lang.String[] concreteIndices)
shards
in class TransportBroadcastByNodeAction<UpgradeRequest,UpgradeResponse,org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult>
clusterState
- the cluster staterequest
- the underlying requestconcreteIndices
- the concrete indices on which to execute the operationprotected ClusterBlockException checkGlobalBlock(ClusterState state, UpgradeRequest request)
TransportBroadcastByNodeAction
checkGlobalBlock
in class TransportBroadcastByNodeAction<UpgradeRequest,UpgradeResponse,org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult>
state
- the cluster staterequest
- the underlying requestprotected ClusterBlockException checkRequestBlock(ClusterState state, UpgradeRequest request, java.lang.String[] concreteIndices)
TransportBroadcastByNodeAction
checkRequestBlock
in class TransportBroadcastByNodeAction<UpgradeRequest,UpgradeResponse,org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult>
state
- the cluster staterequest
- the underlying requestconcreteIndices
- the concrete indices on which to execute the operationprotected void doExecute(Task task, UpgradeRequest request, ActionListener<UpgradeResponse> listener)
doExecute
in class TransportBroadcastByNodeAction<UpgradeRequest,UpgradeResponse,org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult>