Skip to content
Snippets Groups Projects
Commit 792fcd80 authored by Devaraj K's avatar Devaraj K Committed by Andrew Or
Browse files

[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
parent b285ac5b
No related branches found
No related tags found
No related merge requests found
...@@ -148,7 +148,9 @@ private[spark] class YarnClientSchedulerBackend( ...@@ -148,7 +148,9 @@ private[spark] class YarnClientSchedulerBackend(
*/ */
override def stop() { override def stop() {
assert(client != null, "Attempted to stop this scheduler before starting it!") assert(client != null, "Attempted to stop this scheduler before starting it!")
monitorThread.interrupt() if (monitorThread != null) {
monitorThread.interrupt()
}
super.stop() super.stop()
client.stop() client.stop()
logInfo("Stopped") logInfo("Stopped")
......
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