diff options
author | zhuol <zhuol@yahoo-inc.com> | 2016-01-26 09:40:02 -0600 |
---|---|---|
committer | Tom Graves <tgraves@yahoo-inc.com> | 2016-01-26 09:40:02 -0600 |
commit | ae0309a8812a4fade3a0ea67d8986ca870aeb9eb (patch) | |
tree | 32b55ce723675e65d66524f16df3e3a097916fef /core | |
parent | 649e9d0f5b2d5fc13f2dd5be675331510525927f (diff) | |
download | spark-ae0309a8812a4fade3a0ea67d8986ca870aeb9eb.tar.gz spark-ae0309a8812a4fade3a0ea67d8986ca870aeb9eb.tar.bz2 spark-ae0309a8812a4fade3a0ea67d8986ca870aeb9eb.zip |
[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 <zhuol@yahoo-inc.com>
Closes #9946 from zhuoliu/10911.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala | 1 |
1 files changed, 1 insertions, 0 deletions
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() = { |