From ae0309a8812a4fade3a0ea67d8986ca870aeb9eb Mon Sep 17 00:00:00 2001 From: zhuol Date: Tue, 26 Jan 2016 09:40:02 -0600 Subject: [SPARK-10911] Executors should System.exit on clean shutdown. Call system.exit explicitly to make sure non-daemon user threads terminate. Without this, user applications might live forever if the cluster manager does not appropriately kill them. E.g., YARN had this bug: HADOOP-12441. Author: zhuol Closes #9946 from zhuoliu/10911. --- .../scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'core') diff --git a/core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala b/core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala index e3a6c4c07a..136cf4a84d 100644 --- a/core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala +++ b/core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala @@ -241,6 +241,7 @@ private[spark] object CoarseGrainedExecutorBackend extends Logging { } run(driverUrl, executorId, hostname, cores, appId, workerUrl, userClassPath) + System.exit(0) } private def printUsageAndExit() = { -- cgit v1.2.3