public class WorkingBulkByScrollTask extends BulkByScrollTask implements SuccessfullyProcessed
BulkByScrollTask subclass for tasks that actually perform the work. Compare to ParentBulkByScrollTask.BulkByScrollTask.Status, BulkByScrollTask.StatusOrException| Constructor and Description |
|---|
WorkingBulkByScrollTask(long id,
java.lang.String type,
java.lang.String action,
java.lang.String description,
TaskId parentTask,
java.lang.Integer sliceId,
float requestsPerSecond) |
| Modifier and Type | Method and Description |
|---|---|
void |
countBatch() |
void |
countBulkRetry() |
void |
countCreated() |
void |
countDeleted() |
void |
countNoop() |
void |
countSearchRetry() |
void |
countUpdated() |
void |
countVersionConflict() |
void |
delayPrepareBulkRequest(ThreadPool threadPool,
TimeValue lastBatchStartTime,
int lastBatchSize,
AbstractRunnable prepareBulkRequestRunnable)
Schedule prepareBulkRequestRunnable to run after some delay.
|
long |
getCreated()
Count of documents created.
|
long |
getDeleted()
Count of successful delete operations.
|
TaskInfo |
getInfoGivenSliceInfo(java.lang.String localNodeId,
java.util.List<TaskInfo> sliceInfo)
Build the status for this task given a snapshot of the information of running slices.
|
BulkByScrollTask.Status |
getStatus()
Build a status for this task or null if this task doesn't have status.
|
long |
getUpdated()
Count of documents updated.
|
protected void |
onCancelled()
Called after the task is cancelled so that it can take any actions that it has to take.
|
void |
rethrottle(float newRequestsPerSecond)
Apply the
newRequestsPerSecond. |
int |
runningSliceSubTasks()
The number of sub-slices that are still running.
|
void |
setTotal(long totalHits) |
TimeValue |
throttleWaitTime(TimeValue lastBatchStartTime,
TimeValue now,
int lastBatchSize) |
shouldCancelChildrenOnCancellationcancelOnParentLeaving, getReasonCancelled, isCancelledgetAction, getDescription, getId, getParentTaskId, getStartTime, getType, result, result, taskInfo, taskInfoclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSuccessfullyProcessedpublic WorkingBulkByScrollTask(long id,
java.lang.String type,
java.lang.String action,
java.lang.String description,
TaskId parentTask,
java.lang.Integer sliceId,
float requestsPerSecond)
public BulkByScrollTask.Status getStatus()
TaskgetStatus in class BulkByScrollTaskprotected void onCancelled()
CancellableTaskonCancelled in class CancellableTaskpublic int runningSliceSubTasks()
BulkByScrollTaskWorkingBulkByScrollTask will always have 0 and
ParentBulkByScrollTask will return the number of waiting tasks. Used to decide how to perform rethrottling.runningSliceSubTasks in class BulkByScrollTaskpublic TaskInfo getInfoGivenSliceInfo(java.lang.String localNodeId, java.util.List<TaskInfo> sliceInfo)
BulkByScrollTaskgetInfoGivenSliceInfo in class BulkByScrollTaskpublic void setTotal(long totalHits)
public void countBatch()
public void countNoop()
public long getCreated()
SuccessfullyProcessedgetCreated in interface SuccessfullyProcessedpublic void countCreated()
public long getUpdated()
SuccessfullyProcessedgetUpdated in interface SuccessfullyProcessedpublic void countUpdated()
public long getDeleted()
SuccessfullyProcessedgetDeleted in interface SuccessfullyProcessedpublic void countDeleted()
public void countVersionConflict()
public void countBulkRetry()
public void countSearchRetry()
public void delayPrepareBulkRequest(ThreadPool threadPool, TimeValue lastBatchStartTime, int lastBatchSize, AbstractRunnable prepareBulkRequestRunnable)
public TimeValue throttleWaitTime(TimeValue lastBatchStartTime, TimeValue now, int lastBatchSize)
public void rethrottle(float newRequestsPerSecond)
BulkByScrollTasknewRequestsPerSecond.rethrottle in class BulkByScrollTask