diff options
author | meiyoula <1039320815@qq.com> | 2015-12-04 16:50:40 -0800 |
---|---|---|
committer | Marcelo Vanzin <vanzin@cloudera.com> | 2015-12-04 16:50:43 -0800 |
commit | bbfc16ec9d690c2dfa20896bd6d33f9783b9c109 (patch) | |
tree | e1da668a41c2ce9319bf78cc751ef4fc54feba92 /yarn/src/main/scala/org | |
parent | b7204e1d41271d2e8443484371770936664350b1 (diff) | |
download | spark-bbfc16ec9d690c2dfa20896bd6d33f9783b9c109.tar.gz spark-bbfc16ec9d690c2dfa20896bd6d33f9783b9c109.tar.bz2 spark-bbfc16ec9d690c2dfa20896bd6d33f9783b9c109.zip |
[SPARK-12142][CORE]Reply false when container allocator is not ready and reset target
Using Dynamic Allocation function, when a new AM is starting, and ExecutorAllocationManager send RequestExecutor message to AM. If the container allocator is not ready, the whole app will hang on
Author: meiyoula <1039320815@qq.com>
Closes #10138 from XuTingjun/patch-1.
Diffstat (limited to 'yarn/src/main/scala/org')
-rw-r--r-- | yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala index 13ef4dfd64..1970f7d150 100644 --- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala +++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala @@ -600,11 +600,12 @@ private[spark] class ApplicationMaster( localityAwareTasks, hostToLocalTaskCount)) { resetAllocatorInterval() } + context.reply(true) case None => logWarning("Container allocator is not ready to request executors yet.") + context.reply(false) } - context.reply(true) case KillExecutors(executorIds) => logInfo(s"Driver requested to kill executor(s) ${executorIds.mkString(", ")}.") |