Scheduling Mode (aka order task policy or scheduling policy or scheduling order) defines a policy to sort tasks in order for execution.
The scheduling mode
schedulingMode attribute is part of the TaskScheduler Contract.
The only implementation of the
TaskScheduler contract in Spark — TaskSchedulerImpl — uses spark.scheduler.mode setting to configure
schedulingMode that is merely used to set up the rootPool attribute (with
FIFO being the default). It happens when
TaskSchedulerImpl is initialized.
There are three acceptable scheduling modes:
Out of three possible
After the root pool is initialized, the scheduling mode is no longer relevant (since the Schedulable that represents the root pool is fully set up).
The root pool is later used when