Skip to content

Commit 32ac7af

Browse files
committed
review commit
1 parent 056b8c7 commit 32ac7af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,12 @@ class ApplicationMaster(args: ApplicationMasterArguments, conf: Configuration,
253253
logInfo("Allocating " + args.numExecutors + " executors.")
254254
// Wait until all containers have finished
255255
yarnAllocator.addResourceRequests(args.numExecutors)
256+
yarnAllocator.allocateResources()
256257
// Exits the loop if the user thread exits.
257258
while (yarnAllocator.getNumExecutorsRunning < args.numExecutors && userThread.isAlive) {
258-
yarnAllocator.allocateResources()
259259
checkNumExecutorsFailed()
260260
allocateMissingExecutor()
261+
yarnAllocator.allocateResources()
261262
ApplicationMaster.incrementAllocatorLoop(1)
262263
Thread.sleep(100)
263264
}

0 commit comments

Comments
 (0)