git commit: SPARK-1689: Spark application should die when removed by Master

2014-05-19 Thread tdas
Repository: spark
Updated Branches:
  refs/heads/master 6a2c5c610 - b0ce22e07


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 aa...@databricks.com

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


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/b0ce22e0
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/b0ce22e0
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/b0ce22e0

Branch: refs/heads/master
Commit: b0ce22e071da4cc62ec5e29abf7b1299b8e4a6b0
Parents: 6a2c5c6
Author: Aaron Davidson aa...@databricks.com
Authored: Mon May 19 20:55:26 2014 -0700
Committer: Tathagata Das tathagata.das1...@gmail.com
Committed: Mon May 19 20:55:26 2014 -0700

--
 .../spark/scheduler/cluster/SparkDeploySchedulerBackend.scala  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/b0ce22e0/core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
--
diff --git 
a/core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
 
b/core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
index 9768670..9c07b3f 100644
--- 
a/core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
+++ 
b/core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
@@ -88,6 +88,8 @@ private[spark] class SparkDeploySchedulerBackend(
 if (!stopping) {
   logError(Application has been killed. Reason:  + reason)
   scheduler.error(reason)
+  // Ensure the application terminates, as we can no longer run jobs.
+  sc.stop()
 }
   }
 



git commit: SPARK-1689: Spark application should die when removed by Master

2014-05-19 Thread tdas
Repository: spark
Updated Branches:
  refs/heads/branch-1.0 875c54fb3 - 78b6e6f1e


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 aa...@databricks.com

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 b0ce22e071da4cc62ec5e29abf7b1299b8e4a6b0)
Signed-off-by: Tathagata Das tathagata.das1...@gmail.com


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/78b6e6f1
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/78b6e6f1
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/78b6e6f1

Branch: refs/heads/branch-1.0
Commit: 78b6e6f1e8ee6a27ef4eed93aac6eba716b5ffce
Parents: 875c54f
Author: Aaron Davidson aa...@databricks.com
Authored: Mon May 19 20:55:26 2014 -0700
Committer: Tathagata Das tathagata.das1...@gmail.com
Committed: Mon May 19 21:01:18 2014 -0700

--
 .../spark/scheduler/cluster/SparkDeploySchedulerBackend.scala  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/78b6e6f1/core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
--
diff --git 
a/core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
 
b/core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
index 9768670..9c07b3f 100644
--- 
a/core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
+++ 
b/core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
@@ -88,6 +88,8 @@ private[spark] class SparkDeploySchedulerBackend(
 if (!stopping) {
   logError(Application has been killed. Reason:  + reason)
   scheduler.error(reason)
+  // Ensure the application terminates, as we can no longer run jobs.
+  sc.stop()
 }
   }