public abstract class BulkByScrollTask extends CancellableTask
Modifier and Type | Class and Description |
---|---|
static class |
BulkByScrollTask.Status |
static class |
BulkByScrollTask.StatusOrException
The status of a slice of the request.
|
Constructor and Description |
---|
BulkByScrollTask(long id,
java.lang.String type,
java.lang.String action,
java.lang.String description,
TaskId parentTaskId) |
Modifier and Type | Method and Description |
---|---|
abstract 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.
|
abstract BulkByScrollTask.Status |
getStatus()
Build a status for this task or null if this task doesn't have status.
|
abstract void |
rethrottle(float newRequestsPerSecond)
Apply the
newRequestsPerSecond . |
abstract int |
runningSliceSubTasks()
The number of sub-slices that are still running.
|
boolean |
shouldCancelChildrenOnCancellation()
Returns true if this task can potentially have children that need to be cancelled when it parent is cancelled.
|
cancelOnParentLeaving, getReasonCancelled, isCancelled, onCancelled
getAction, getDescription, getId, getParentTaskId, getStartTime, getType, result, result, taskInfo, taskInfo
public BulkByScrollTask(long id, java.lang.String type, java.lang.String action, java.lang.String description, TaskId parentTaskId)
public abstract int runningSliceSubTasks()
WorkingBulkByScrollTask
will always have 0 and
ParentBulkByScrollTask
will return the number of waiting tasks. Used to decide how to perform rethrottling.public abstract void rethrottle(float newRequestsPerSecond)
newRequestsPerSecond
.public abstract BulkByScrollTask.Status getStatus()
Task
public abstract TaskInfo getInfoGivenSliceInfo(java.lang.String localNodeId, java.util.List<TaskInfo> sliceInfo)
public boolean shouldCancelChildrenOnCancellation()
CancellableTask
shouldCancelChildrenOnCancellation
in class CancellableTask