aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshaolinliu <liu.shaolin1@zte.com.cn>2017-04-05 13:47:44 +0100
committerSean Owen <sowen@cloudera.com>2017-04-05 13:47:44 +0100
commit71c3c48159fe7eb4a46fc2a1b78b72088ccfa824 (patch)
tree9b0b27532e41af0cdc98e29cc51c2e81545d7ede
parent6f09dc70d9808cae004ceda9ad615aa9be50f43d (diff)
downloadspark-71c3c48159fe7eb4a46fc2a1b78b72088ccfa824.tar.gz
spark-71c3c48159fe7eb4a46fc2a1b78b72088ccfa824.tar.bz2
spark-71c3c48159fe7eb4a46fc2a1b78b72088ccfa824.zip
[SPARK-19807][WEB UI] Add reason for cancellation when a stage is killed using web UI
## What changes were proposed in this pull request? When a user kills a stage using web UI (in Stages page), StagesTab.handleKillRequest requests SparkContext to cancel the stage without giving a reason. SparkContext has cancelStage(stageId: Int, reason: String) that Spark could use to pass the information for monitoring/debugging purposes. ## How was this patch tested? manual tests Please review http://spark.apache.org/contributing.html before opening a pull request. Author: shaolinliu <liu.shaolin1@zte.com.cn> Author: lvdongr <lv.dongdong@zte.com.cn> Closes #17258 from shaolinliu/SPARK-19807.
-rw-r--r--core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala b/core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala
index c1f2511437..181465bdf9 100644
--- a/core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala
+++ b/core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala
@@ -42,7 +42,7 @@ private[ui] class StagesTab(parent: SparkUI) extends SparkUITab(parent, "stages"
val stageId = Option(request.getParameter("id")).map(_.toInt)
stageId.foreach { id =>
if (progressListener.activeStages.contains(id)) {
- sc.foreach(_.cancelStage(id))
+ sc.foreach(_.cancelStage(id, "killed via the Web UI"))
// Do a quick pause here to give Spark time to kill the stage so it shows up as
// killed after the refresh. Note that this will block the serving thread so the
// time should be limited in duration.