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 |
countSearchRetry() |
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.
|
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 long getCreated()
SuccessfullyProcessedgetCreated in interface SuccessfullyProcessedpublic long getUpdated()
SuccessfullyProcessedgetUpdated in interface SuccessfullyProcessedpublic long getDeleted()
SuccessfullyProcessedgetDeleted in interface SuccessfullyProcessedpublic void countSearchRetry()
public void rethrottle(float newRequestsPerSecond)
BulkByScrollTasknewRequestsPerSecond.rethrottle in class BulkByScrollTask