Class TransportResizeAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
org.elasticsearch.action.support.HandledTransportAction<Request,Response>
org.elasticsearch.action.support.master.TransportMasterNodeAction<ResizeRequest,ResizeResponse>
org.elasticsearch.action.admin.indices.shrink.TransportResizeAction
public class TransportResizeAction extends TransportMasterNodeAction<ResizeRequest,ResizeResponse>
Main class to initiate resizing (shrink / split) an index into a new index
-
Field Summary
Fields inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
clusterService, executor, indexNameExpressionResolver, threadPool, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, localConnection, taskManager -
Constructor Summary
Constructors Modifier Constructor Description protectedTransportResizeAction(java.lang.String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataCreateIndexService createIndexService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Client client)TransportResizeAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataCreateIndexService createIndexService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Client client) -
Method Summary
Modifier and Type Method Description protected static intcalTargetShardsNum(int sourceIndexShardsNum, int minShardsNum)protected ClusterBlockExceptioncheckBlock(ResizeRequest request, ClusterState state)protected java.lang.StringgetMasterActionName(DiscoveryNode node)Allows to conditionally return a different master node action name in the case an action gets renamed.protected voidmasterOperation(ResizeRequest resizeRequest, ClusterState state, ActionListener<ResizeResponse> listener)Methods inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
doExecute, localExecute, masterOperationMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, executeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TransportResizeAction
@Inject public TransportResizeAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataCreateIndexService createIndexService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Client client) -
TransportResizeAction
protected TransportResizeAction(java.lang.String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataCreateIndexService createIndexService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Client client)
-
-
Method Details
-
checkBlock
- Specified by:
checkBlockin classTransportMasterNodeAction<ResizeRequest,ResizeResponse>
-
masterOperation
protected void masterOperation(ResizeRequest resizeRequest, ClusterState state, ActionListener<ResizeResponse> listener)- Specified by:
masterOperationin classTransportMasterNodeAction<ResizeRequest,ResizeResponse>
-
getMasterActionName
Description copied from class:TransportMasterNodeActionAllows to conditionally return a different master node action name in the case an action gets renamed. This mainly for backwards compatibility should be used rarely- Overrides:
getMasterActionNamein classTransportMasterNodeAction<ResizeRequest,ResizeResponse>
-
calTargetShardsNum
protected static int calTargetShardsNum(int sourceIndexShardsNum, int minShardsNum)
-