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

ExecutorAllocationClient

ExecutorAllocationClient

ExecutorAllocationClient is a contract for clients to communicate with a cluster manager to request or kill executors.

ExecutorAllocationClient Contract

Note
ExecutorAllocationClient is a private[spark] contract.
Table 1. ExecutorAllocationClient Contract
Method Description

getExecutorIds

Finds identifiers of the executors in use.

Used when SparkContext calculates the executors in use and also when Spark Streaming manages executors.

requestTotalExecutors

Updates the cluster manager with the exact number of executors desired. It returns whether the request has been acknowledged by the cluster manager (true) or not (false).

Used when:

requestExecutors

Requests additional executors from a cluster manager and returns whether the request has been acknowledged by the cluster manager (true) or not (false).

Used when SparkContext requests additional executors (for coarse-grained scheduler backends only).

killExecutor

Requests a cluster manager to kill a single executor that is no longer in use and returns whether the request has been acknowledged by the cluster manager (true) or not (false).

The default implementation simply calls killExecutors (with a single-element collection of executors to kill).

Used when:

killExecutors

Requests that a cluster manager to kill one or many executors that are no longer in use and returns whether the request has been acknowledged by the cluster manager (true) or not (false).

Interestingly, it is only used for killExecutor.

killExecutorsOnHost

Used exclusively when BlacklistTracker kills blacklisted executors.

赞(0) 打赏
未经允许不得转载:spark技术分享 » ExecutorAllocationClient
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏