关注 spark技术分享,
撸spark源码 玩spark最佳实践

Schedulable Builders

Schedulable Builders

SchedulableBuilder is a contract of schedulable builders that operate on a pool of TaskSetManagers (from an owning TaskSchedulerImpl).

Note
A SchedulableBuilder is created when TaskSchedulerImpl is being initialized. You can select the SchedulableBuilder to use by spark.scheduler.mode setting.

Spark comes with two implementations of the SchedulableBuilder Contract:

Note
SchedulableBuilder is a private[spark] Scala trait. You can find the sources in org.apache.spark.scheduler.SchedulableBuilder.

SchedulableBuilder Contract

Every SchedulableBuilder provides the following services:

Root Pool (rootPool method)

rootPool method returns a Pool (of Schedulables).

This is the data structure managed (aka wrapped) by SchedulableBuilders.

Build Pools (buildPools method)

Note
It is exclusively called by TaskSchedulerImpl.initialize.

Adding Schedulable (to Pool) (addTaskSetManager method)

addTaskSetManager registers the manager Schedulable (with additional properties) to the rootPool.

Note
addTaskSetManager is exclusively used by TaskSchedulerImpl to submit a TaskSetManager for a stage for execution.
赞(0) 打赏
未经允许不得转载:spark技术分享 » Schedulable Builders
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏