From bc3aa660ad28955306b7756e506ead083e4c879d Mon Sep 17 00:00:00 2001 From: witgo Date: Tue, 10 Jun 2014 09:40:48 +0800 Subject: [PATCH] review commit --- .../scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala b/yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala index 24e34227fd7a0..d93e5bb0225d5 100644 --- a/yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala +++ b/yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala @@ -201,9 +201,10 @@ class ExecutorLauncher(args: ApplicationMasterArguments, conf: Configuration, sp logInfo("Allocating " + args.numExecutors + " executors.") // Wait until all containers have finished yarnAllocator.addResourceRequests(args.numExecutors) + yarnAllocator.allocateResources() while ((yarnAllocator.getNumExecutorsRunning < args.numExecutors) && (!driverClosed)) { - yarnAllocator.allocateResources() allocateMissingExecutor() + yarnAllocator.allocateResources() Thread.sleep(100) }