Class AdaptiveScheduler

java.lang.Object
org.apache.flink.runtime.scheduler.adaptive.AdaptiveScheduler
All Implemented Interfaces:
AutoCloseable, StateTransitions, StateTransitions.ToCancelling, StateTransitions.ToCreatingExecutionGraph, StateTransitions.ToExecuting, StateTransitions.ToFailing, StateTransitions.ToFinished, StateTransitions.ToRestarting, StateTransitions.ToStopWithSavepoint, StateTransitions.ToWaitingForResources, GlobalFailureHandler, SchedulerNG, org.apache.flink.util.AutoCloseableAsync

public class AdaptiveScheduler extends Object implements SchedulerNG
A SchedulerNG implementation that uses the declarative resource management and automatically adapts the parallelism in case not enough resource could be acquired to run at the configured parallelism, as described in FLIP-160.

This scheduler only supports jobs with streaming semantics, i.e., all vertices are connected via pipelined data-exchanges.

The implementation is spread over multiple State classes that control which RPCs are allowed in a given state and what state transitions are possible (see the FLIP for an overview). This class can thus be roughly split into 2 parts:

1) RPCs, which must forward the call to the state via State.tryRun(Class, ThrowingConsumer, String) or State.tryCall(Class, FunctionWithException, String).

2) Context methods, which are called by states, to either transition into another state or access functionality of some component in the scheduler.