smallzhongfeng commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1109359222
##########
core/src/main/scala/org/apache/spark/ExecutorAllocationClient.scala:
##########
@@ -111,21 +111,24 @@ private[spark] trait ExecutorAllocationClient {
* @param executorId identifiers of executor to decommission
* @param decommissionInfo information about the decommission (reason, host
loss)
* @param adjustTargetNumExecutors if we should adjust the target number of
executors.
- * @param triggeredByExecutor whether the decommission is triggered at
executor.
- * (TODO: add a new type like
`ExecutorDecommissionInfo` for the
- * case where executor is decommissioned at
executor first, so we
- * don't need this extra parameter.)
* @return whether the request is acknowledged by the cluster manager.
*/
final def decommissionExecutor(
executorId: String,
- decommissionInfo: ExecutorDecommissionInfo,
- adjustTargetNumExecutors: Boolean,
- triggeredByExecutor: Boolean = false): Boolean = {
- val decommissionedExecutors = decommissionExecutors(
- Array((executorId, decommissionInfo)),
- adjustTargetNumExecutors = adjustTargetNumExecutors,
- triggeredByExecutor = triggeredByExecutor)
+ decommissionInfo: DecommissionInfo,
+ adjustTargetNumExecutors: Boolean): Boolean = {
+ val decommissionedExecutors = decommissionInfo match {
+ case _: ExecutorDecommissionInfo =>
+ decommissionExecutors(
Review Comment:
Actually `triggeredByExecutor` was used in `ExecutorAllocationClient` 's
implementation class `CoarseGrainedSchedulerBackend` and
`KubernetesClusterSchedulerBackend`. We can see this
https://github.com/apache/spark/blob/9f7582c8cbeae70c31c183567bf5320d1c3210fe/core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala#L555
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]