@@ -351,20 +351,17 @@ class CoarseGrainedSchedulerBackend(scheduler: TaskSchedulerImpl, val rpcEnv: Rp
351351
352352 /**
353353 * Reset the state of CoarseGrainedSchedulerBackend to the initial state. Currently it will only
354- * be called in the yarn-client mode when AM re-registers after a failure, also dynamic
355- * allocation is enabled.
354+ * be called in the yarn-client mode when AM re-registers after a failure.
356355 * */
357356 protected def reset (): Unit = synchronized {
358- if (Utils .isDynamicAllocationEnabled(conf)) {
359- numPendingExecutors = 0
360- executorsPendingToRemove.clear()
361-
362- // Remove all the lingering executors that should be removed but not yet. The reason might be
363- // because (1) disconnected event is not yet received; (2) executors die silently.
364- executorDataMap.toMap.foreach { case (eid, _) =>
365- driverEndpoint.askWithRetry[Boolean ](
366- RemoveExecutor (eid, SlaveLost (" Stale executor after cluster manager re-registered." )))
367- }
357+ numPendingExecutors = 0
358+ executorsPendingToRemove.clear()
359+
360+ // Remove all the lingering executors that should be removed but not yet. The reason might be
361+ // because (1) disconnected event is not yet received; (2) executors die silently.
362+ executorDataMap.toMap.foreach { case (eid, _) =>
363+ driverEndpoint.askWithRetry[Boolean ](
364+ RemoveExecutor (eid, SlaveLost (" Stale executor after cluster manager re-registered." )))
368365 }
369366 }
370367
0 commit comments