diff options
author | Devaraj K <devaraj@apache.org> | 2015-07-01 22:59:04 -0700 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2015-07-01 22:59:13 -0700 |
commit | 5b468cf0c21071d212b0cba7a0cede7eeb5d273b (patch) | |
tree | a74f4b5f811697b350cacc3be6636e5d35cc8bcc | |
parent | 17def395798dfc3af962d34b9a0260fa8880fe7d (diff) | |
download | spark-5b468cf0c21071d212b0cba7a0cede7eeb5d273b.tar.gz spark-5b468cf0c21071d212b0cba7a0cede7eeb5d273b.tar.bz2 spark-5b468cf0c21071d212b0cba7a0cede7eeb5d273b.zip |
[SPARK-8754] [YARN] YarnClientSchedulerBackend doesn't stop gracefully in failure conditions
In YarnClientSchedulerBackend.stop(), added a check for monitorThread.
Author: Devaraj K <devaraj@apache.org>
Closes #7153 from devaraj-kavali/master and squashes the following commits:
66be9ad [Devaraj K] https://issues.apache.org/jira/browse/SPARK-8754 YarnClientSchedulerBackend doesn't stop gracefully in failure conditions
(cherry picked from commit 792fcd802c99a0aef2b67d54f0e6e58710e65956)
Signed-off-by: Andrew Or <andrew@databricks.com>
-rw-r--r-- | yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala b/yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala index 99c05329b4..e7b0af6323 100644 --- a/yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala +++ b/yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala @@ -147,7 +147,9 @@ private[spark] class YarnClientSchedulerBackend( */ override def stop() { assert(client != null, "Attempted to stop this scheduler before starting it!") - monitorThread.interrupt() + if (monitorThread != null) { + monitorThread.interrupt() + } super.stop() client.stop() logInfo("Stopped") |