Skip to content

Commit d3e69cf

Browse files
committed
Delete "initializing = true" in ExecutorAllocationManager.reset
1 parent 013474a commit d3e69cf

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,6 @@ private[spark] class ExecutorAllocationManager(
249249
* yarn-client mode when AM re-registers after a failure.
250250
*/
251251
def reset(): Unit = synchronized {
252-
/**
253-
* When some tasks need to be scheduled and initial executor = 0, resetting the initializing
254-
* field may cause it to not be set to false in yarn.
255-
* SPARK-20079: https://issues.apache.org/jira/browse/SPARK-20079
256-
*/
257-
if (maxNumExecutorsNeeded() == 0) {
258-
initializing = true
259-
}
260252
numExecutorsTarget = initialNumExecutors
261253
numExecutorsToAdd = 1
262254

core/src/test/scala/org/apache/spark/ExecutorAllocationManagerSuite.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,9 +863,6 @@ class ExecutorAllocationManagerSuite
863863
assert(!initializing(manager))
864864
manager.reset()
865865
assert(!initializing(manager))
866-
sc.listenerBus.postToAll(SparkListenerStageCompleted(stageInfo))
867-
manager.reset()
868-
assert(initializing(manager))
869866
}
870867

871868
test("reset the state of allocation manager") {

0 commit comments

Comments
 (0)