Skip to content

Commit 78b6e6f

Browse files
aarondavtdas
authored andcommitted
SPARK-1689: Spark application should die when removed by Master
scheduler.error() will mask the error if there are active tasks. Being removed is a cataclysmic event for Spark applications, and should probably be treated as such. Author: Aaron Davidson <[email protected]> Closes #832 from aarondav/i-love-u and squashes the following commits: 9f1200f [Aaron Davidson] SPARK-1689: Spark application should die when removed by Master (cherry picked from commit b0ce22e) Signed-off-by: Tathagata Das <[email protected]>
1 parent 875c54f commit 78b6e6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ private[spark] class SparkDeploySchedulerBackend(
8888
if (!stopping) {
8989
logError("Application has been killed. Reason: " + reason)
9090
scheduler.error(reason)
91+
// Ensure the application terminates, as we can no longer run jobs.
92+
sc.stop()
9193
}
9294
}
9395

0 commit comments

Comments
 (0)