@DefaultImplementation(value=RoundRobinSchedulingPolicy.class) public interface SchedulingPolicy
BatchSingleJobScheduler
assigns task groups to executors.Modifier and Type | Method and Description |
---|---|
long |
getScheduleTimeoutMs()
Returns this scheduling policy's timeout before an executor assignment.
|
void |
onExecutorAdded(String executorId)
Adds the executorId to the pool of available executors.
|
Set<String> |
onExecutorRemoved(String executorId)
Deletes the executorId from the pool of available executors.
|
void |
onTaskGroupExecutionComplete(String executorId,
String taskGroupId)
Marks the taskGroup's completion in the executor.
|
void |
onTaskGroupExecutionFailed(String executorId,
String taskGroupId)
Marks the taskGroup's failure in the executor.
|
boolean |
scheduleTaskGroup(ScheduledTaskGroup scheduledTaskGroup,
JobStateManager jobStateManager)
Attempts to schedule the given taskGroup to an executor according to this policy.
|
long getScheduleTimeoutMs()
boolean scheduleTaskGroup(ScheduledTaskGroup scheduledTaskGroup, JobStateManager jobStateManager)
scheduledTaskGroup
- to schedule.jobStateManager
- jobStateManager which the TaskGroup belongs to.void onExecutorAdded(String executorId)
executorId
- for the executor that has been added.Set<String> onExecutorRemoved(String executorId)
executorId
- for the executor that has been deleted.void onTaskGroupExecutionComplete(String executorId, String taskGroupId)
executorId
- of the executor where the taskGroup's execution has completed.taskGroupId
- whose execution has completed.void onTaskGroupExecutionFailed(String executorId, String taskGroupId)
executorId
- of the executor where the taskGroup's execution has failed.taskGroupId
- whose execution has completed.Copyright © 2018. All rights reserved.