From 00a42e7c3d08ba01265db8c7329f0ba2148ce41a Mon Sep 17 00:00:00 2001 From: root Date: Wed, 14 Jun 2017 15:56:24 -0700 Subject: [PATCH] [SPARK-21099][Spark Core] INFO Log Message Using Incorrect Executor Idle Timeout Value --- .../scala/org/apache/spark/ExecutorAllocationManager.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala b/core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala index fcc72ff49276d..8a82d91980b40 100644 --- a/core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala +++ b/core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala @@ -432,8 +432,10 @@ private[spark] class ExecutorAllocationManager( if (testing || executorsRemoved.nonEmpty) { executorsRemoved.foreach { removedExecutorId => newExecutorTotal -= 1 + val hasCachedBlocks = SparkEnv.get.blockManager.master.hasCachedBlocks(executorId); + val timeout = if (hasCachedBlocks) cachedExecutorIdleTimeoutS else executorIdleTimeoutS; logInfo(s"Removing executor $removedExecutorId because it has been idle for " + - s"$executorIdleTimeoutS seconds (new desired total will be $newExecutorTotal)") + s"$timeout seconds (new desired total will be $newExecutorTotal)") executorsPendingToRemove.add(removedExecutorId) } executorsRemoved