Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to support the reactive mode (FLIP-159) we need a different type of scheduler which first announces the required resources and only after having received the resources decides on the actual parallelism with which to execute the job. This has the benefit that this scheduler can schedule jobs if not all required resources are fulfilled. Moreover, it allows to continue executing jobs even after TaskManagers have been lost.

Proposed Changes

The declarative scheduler will first work for streaming jobs only. This will simplify things considerably because there is only a single job pipelined regionwe always have to schedule all operators. Moreover, we could treat task failures as global failures which restart by treating every failure as a global failover which restarts the whole topology, we can further simplify the scheduler. This failover behaviour is true the default for many streaming topologies anyways if they don't consist of disjunct graphs. Given these assumptions we could want to develop the following scheduler:

The scheduler takes the JobGraph for which it will first calculate the desired resources. After declaring these resources, the scheduler will wait until the available resources have stabilizedstabilised. Once the resources are stabilized the stabilised the scheduler should be able to decide on the actual parallelism of the job. Once the parallelism is decided and the executions are matched with the available slots, the scheduler deploys the executions.

Whenever a fault occurs (soft or hard), we will fail the whole job and try to restart it. Restarting works by cancelling all deployed tasks and then restarting the scheduling of the JobGraph following the same code paths as the initial scheduling operation.

...

If the system cannot recover from a local failover because it does not have enough slots available, it must be escalated which makes it a global failover. A global failover will allow the system to rescale the whole job.Ideally, we use the same mechanism to find a new slot for the local failover as we use for matching a job-pipelined region with a set of available slots and thereby deciding on the parallelism of the job-pipelined region.


Compatibility, Deprecation, and Migration Plan

...