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
ConstructorsConstructorDescriptionWorkerBulkByScrollTaskState(BulkByScrollTask task, Integer sliceId, float requestsPerSecond) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoidvoiddelayPrepareBulkRequest(ThreadPool threadPool, long lastBatchStartTimeNS, int lastBatchSize, AbstractRunnable prepareBulkRequestRunnable)Schedule prepareBulkRequestRunnable to run after some delay.longCount of documents created.longCount of successful delete operations.longCount of documents updated.voidvoidrethrottle(float newRequestsPerSecond)ApplynewRequestsPerSecondas the new rate limit for this task's search requestsvoidsetTotal(long totalHits)org.elasticsearch.core.TimeValuethrottleWaitTime(long lastBatchStartTimeNS, long nowNS, int lastBatchSize)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:SuccessfullyProcessedCount of documents created.- Specified by:
getCreatedin interfaceSuccessfullyProcessed
-
countCreated
public void countCreated() -
getUpdated
public long getUpdated()Description copied from interface:SuccessfullyProcessedCount of documents updated.- Specified by:
getUpdatedin interfaceSuccessfullyProcessed
-
countUpdated
public void countUpdated() -
getDeleted
public long getDeleted()Description copied from interface:SuccessfullyProcessedCount of successful delete operations.- Specified by:
getDeletedin 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)ApplynewRequestsPerSecondas the new rate limit for this task's search requests
-