Class RethrottleRequestBuilder

java.lang.Object
org.elasticsearch.action.ActionRequestBuilder<Request,Response>
org.elasticsearch.action.support.tasks.TasksRequestBuilder<RethrottleRequest,org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse,RethrottleRequestBuilder>
org.elasticsearch.reindex.RethrottleRequestBuilder

public class RethrottleRequestBuilder extends org.elasticsearch.action.support.tasks.TasksRequestBuilder<RethrottleRequest,org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse,RethrottleRequestBuilder>
Java API support for changing the throttle on reindex tasks while they are running.
  • Field Summary

    Fields inherited from class org.elasticsearch.action.ActionRequestBuilder

    action, client, request
  • Constructor Summary

    Constructors
    Constructor
    Description
    RethrottleRequestBuilder(org.elasticsearch.client.ElasticsearchClient client, org.elasticsearch.action.ActionType<org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse> action)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    setRequestsPerSecond(float requestsPerSecond)
    Set the throttle to apply to all matching requests in sub-requests per second.

    Methods inherited from class org.elasticsearch.action.support.tasks.TasksRequestBuilder

    setActions, setNodesIds, setParentTaskId, setTaskId, setTimeout

    Methods inherited from class org.elasticsearch.action.ActionRequestBuilder

    execute, execute, get, get, get, request

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RethrottleRequestBuilder

      public RethrottleRequestBuilder(org.elasticsearch.client.ElasticsearchClient client, org.elasticsearch.action.ActionType<org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse> action)
  • Method Details

    • setRequestsPerSecond

      public RethrottleRequestBuilder setRequestsPerSecond(float requestsPerSecond)
      Set the throttle to apply to all matching requests in sub-requests per second. Float.POSITIVE_INFINITY means 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.