public class ParentBulkByScrollTask extends BulkByScrollTask
BulkByScrollTask.Status, BulkByScrollTask.StatusOrException| Constructor and Description |
|---|
ParentBulkByScrollTask(long id,
java.lang.String type,
java.lang.String action,
java.lang.String description,
TaskId parentTaskId,
int slices) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
onSliceFailure(ActionListener<BulkByScrollResponse> listener,
int sliceId,
java.lang.Exception e)
Record a failure from a slice and respond to the listener if the request is finished.
|
void |
onSliceResponse(ActionListener<BulkByScrollResponse> listener,
int sliceId,
BulkByScrollResponse response)
Record a response from a slice and respond to the listener if the request is finished.
|
void |
rethrottle(float newRequestsPerSecond)
Apply the
newRequestsPerSecond. |
int |
runningSliceSubTasks()
The number of sub-slices that are still running.
|
shouldCancelChildrenOnCancellationcancelOnParentLeaving, getReasonCancelled, isCancelled, onCancelledgetAction, getDescription, getId, getParentTaskId, getStartTime, getType, result, result, taskInfo, taskInfopublic ParentBulkByScrollTask(long id,
java.lang.String type,
java.lang.String action,
java.lang.String description,
TaskId parentTaskId,
int slices)
public void rethrottle(float newRequestsPerSecond)
BulkByScrollTasknewRequestsPerSecond.rethrottle in class BulkByScrollTaskpublic BulkByScrollTask.Status getStatus()
TaskgetStatus in class BulkByScrollTaskpublic 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 onSliceResponse(ActionListener<BulkByScrollResponse> listener, int sliceId, BulkByScrollResponse response)
public void onSliceFailure(ActionListener<BulkByScrollResponse> listener, int sliceId, java.lang.Exception e)