Package org.elasticsearch.index.reindex
Class WorkerBulkByScrollTaskState
java.lang.Object
org.elasticsearch.index.reindex.WorkerBulkByScrollTaskState
- All Implemented Interfaces:
SuccessfullyProcessed
Task behavior for
BulkByScrollTask
that does the actual work of querying and indexing-
Constructor Summary
ConstructorDescriptionWorkerBulkByScrollTaskState(BulkByScrollTask task, Integer sliceId, float requestsPerSecond)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
void
void
void
void
delayPrepareBulkRequest(ThreadPool threadPool, long lastBatchStartTimeNS, int lastBatchSize, AbstractRunnable prepareBulkRequestRunnable)
Schedule prepareBulkRequestRunnable to run after some delay.long
Count of documents created.long
Count of successful delete operations.long
Count of documents updated.void
void
rethrottle(float newRequestsPerSecond)
ApplynewRequestsPerSecond
as the new rate limit for this task's search requestsvoid
setTotal(long totalHits)
org.elasticsearch.core.TimeValue
throttleWaitTime(long lastBatchStartTimeNS, long nowNS, int lastBatchSize)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.index.reindex.SuccessfullyProcessed
getSuccessfullyProcessed
-
Constructor Details
-
WorkerBulkByScrollTaskState
-
-
Method Details
-
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 interfaceSuccessfullyProcessed
-
countCreated
public void countCreated() -
getUpdated
public long getUpdated()Description copied from interface:SuccessfullyProcessed
Count of documents updated.- Specified by:
getUpdated
in interfaceSuccessfullyProcessed
-
countUpdated
public void countUpdated() -
getDeleted
public long getDeleted()Description copied from interface:SuccessfullyProcessed
Count of successful delete operations.- Specified by:
getDeleted
in interfaceSuccessfullyProcessed
-
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)ApplynewRequestsPerSecond
as the new rate limit for this task's search requests
-