Package org.opensearch.index.reindex
Class RethrottleRequest
java.lang.Object
org.opensearch.core.transport.TransportMessage
org.opensearch.transport.TransportRequest
org.opensearch.action.ActionRequest
org.opensearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
org.opensearch.index.reindex.RethrottleRequest
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable,TaskAwareRequest
A request to change throttling on a task.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensearch.transport.TransportRequest
TransportRequest.EmptyNested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V> -
Field Summary
Fields inherited from class org.opensearch.action.support.tasks.BaseTasksRequest
ALL_ACTIONS, ALL_NODES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatThe throttle to apply to all matching requests in sub-requests per second.setRequestsPerSecond(float requestsPerSecond) Set the throttle to apply to all matching requests in sub-requests per second.validate()voidwriteTo(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class org.opensearch.action.support.tasks.BaseTasksRequest
getActions, getNodes, getParentTaskId, getTaskId, getTimeout, match, setActions, setNodes, setParentTaskId, setTaskId, setTimeout, setTimeoutMethods inherited from class org.opensearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.opensearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.opensearch.core.transport.TransportMessage
remoteAddress, remoteAddressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Constructor Details
-
RethrottleRequest
public RethrottleRequest() -
RethrottleRequest
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceorg.opensearch.core.common.io.stream.Writeable- Overrides:
writeToin classBaseTasksRequest<RethrottleRequest>- Throws:
IOException
-
getRequestsPerSecond
public float getRequestsPerSecond()The throttle to apply to all matching requests in sub-requests per second. 0 means set no throttle and that is the default. -
setRequestsPerSecond
Set the throttle to apply to all matching requests in sub-requests per second.Float.POSITIVE_INFINITYmeans set no throttle. Throttling is done between batches, as we start the next scroll requests. That way we can increase the scroll's timeout to make sure that it contains any time that we might wait. -
validate
- Overrides:
validatein classBaseTasksRequest<RethrottleRequest>
-