Skip to content

Commit

Permalink
[SPARK-8754] [YARN] YarnClientSchedulerBackend doesn't stop gracefull…
Browse files Browse the repository at this point in the history
…y 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 792fcd8)
Signed-off-by: Andrew Or <andrew@databricks.com>
  • Loading branch information
Devaraj K authored and Andrew Or committed Jul 2, 2015
1 parent 17def39 commit 5b468cf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 5b468cf

Please sign in to comment.