Class WorkerBulkByScrollTaskState

java.lang.Object
org.elasticsearch.index.reindex.WorkerBulkByScrollTaskState
All Implemented Interfaces:
SuccessfullyProcessed

public class WorkerBulkByScrollTaskState extends Object implements SuccessfullyProcessed
Task behavior for BulkByScrollTask that does the actual work of querying and indexing
  • Constructor Details

    • WorkerBulkByScrollTaskState

      public WorkerBulkByScrollTaskState(BulkByScrollTask task, Integer sliceId, float requestsPerSecond)
  • Method Details

    • getStatus

      public BulkByScrollTask.Status getStatus()
    • handleCancel

      public void handleCancel()
    • setTotal

      public void setTotal(long totalHits)
    • countBatch

      public void countBatch()
    • countNoop

      public void countNoop()
    • getCreated

      public long getCreated()
      Description copied from interface: SuccessfullyProcessed
      Count of documents created.
      Specified by:
      getCreated in interface SuccessfullyProcessed
    • countCreated

      public void countCreated()
    • getUpdated

      public long getUpdated()
      Description copied from interface: SuccessfullyProcessed
      Count of documents updated.
      Specified by:
      getUpdated in interface SuccessfullyProcessed
    • countUpdated

      public void countUpdated()
    • getDeleted

      public long getDeleted()
      Description copied from interface: SuccessfullyProcessed
      Count of successful delete operations.
      Specified by:
      getDeleted in interface SuccessfullyProcessed
    • countDeleted

      public void countDeleted()
    • countVersionConflict

      public void countVersionConflict()
    • countBulkRetry

      public void countBulkRetry()
    • countSearchRetry

      public void countSearchRetry()
    • delayPrepareBulkRequest

      public void delayPrepareBulkRequest(ThreadPool threadPool, long lastBatchStartTimeNS, int lastBatchSize, AbstractRunnable prepareBulkRequestRunnable)
      Schedule prepareBulkRequestRunnable to run after some delay. This is where throttling plugs into reindexing so the request can be rescheduled over and over again.
    • throttleWaitTime

      public org.elasticsearch.core.TimeValue throttleWaitTime(long lastBatchStartTimeNS, long nowNS, int lastBatchSize)
    • rethrottle

      public void rethrottle(float newRequestsPerSecond)
      Apply newRequestsPerSecond as the new rate limit for this task's search requests