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.
|
shouldCancelChildrenOnCancellation
cancelOnParentLeaving, getReasonCancelled, isCancelled, onCancelled
getAction, getDescription, getId, getParentTaskId, getStartTime, getType, result, result, taskInfo, taskInfo
public ParentBulkByScrollTask(long id, java.lang.String type, java.lang.String action, java.lang.String description, TaskId parentTaskId, int slices)
public void rethrottle(float newRequestsPerSecond)
BulkByScrollTask
newRequestsPerSecond
.rethrottle
in class BulkByScrollTask
public BulkByScrollTask.Status getStatus()
Task
getStatus
in class BulkByScrollTask
public int runningSliceSubTasks()
BulkByScrollTask
WorkingBulkByScrollTask
will always have 0 and
ParentBulkByScrollTask
will return the number of waiting tasks. Used to decide how to perform rethrottling.runningSliceSubTasks
in class BulkByScrollTask
public TaskInfo getInfoGivenSliceInfo(java.lang.String localNodeId, java.util.List<TaskInfo> sliceInfo)
BulkByScrollTask
getInfoGivenSliceInfo
in class BulkByScrollTask
public void onSliceResponse(ActionListener<BulkByScrollResponse> listener, int sliceId, BulkByScrollResponse response)
public void onSliceFailure(ActionListener<BulkByScrollResponse> listener, int sliceId, java.lang.Exception e)