Skip to content
Snippets Groups Projects
Commit bbfc16ec authored by meiyoula's avatar meiyoula Committed by Marcelo Vanzin
Browse files

[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.
parent b7204e1d
No related branches found
No related tags found
No related merge requests found
......@@ -370,6 +370,7 @@ private[spark] class ExecutorAllocationManager(
} else {
logWarning(
s"Unable to reach the cluster manager to request $numExecutorsTarget total executors!")
numExecutorsTarget = oldNumExecutorsTarget
0
}
}
......
......@@ -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(", ")}.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment