aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/resources/org
diff options
context:
space:
mode:
authorAndrew Or <andrew@databricks.com>2015-05-26 16:31:34 -0700
committerAndrew Or <andrew@databricks.com>2015-05-26 16:31:34 -0700
commit8f2082426828c15704426ebca1d015bf956c6841 (patch)
tree4b4c11f48bbba4fc8ed511bae169173dc89a670e /core/src/main/resources/org
parent836a75898fdc4b10d4d00676ef29e24cc96f09fd (diff)
downloadspark-8f2082426828c15704426ebca1d015bf956c6841.tar.gz
spark-8f2082426828c15704426ebca1d015bf956c6841.tar.bz2
spark-8f2082426828c15704426ebca1d015bf956c6841.zip
[SPARK-7864] [UI] Do not kill innocent stages from visualization
**Reproduction.** Run a long-running job, go to the job page, expand the DAG visualization, and click into a stage. Your stage is now killed. Why? This is because the visualization code just reaches into the stage table and grabs the first link it finds. In our case, this first link happens to be the kill link instead of the one to the stage page. **Fix.** Use proper CSS selectors to avoid ambiguity. This is an alternative to #6407. Thanks carsonwang for catching this. Author: Andrew Or <andrew@databricks.com> Closes #6419 from andrewor14/fix-ui-viz-kill and squashes the following commits: 25203bd [Andrew Or] Do not kill innocent stages
Diffstat (limited to 'core/src/main/resources/org')
-rw-r--r--core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js2
-rw-r--r--core/src/main/resources/org/apache/spark/ui/static/timeline-view.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js b/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js
index aaeba5b102..e96af8768d 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js
@@ -193,7 +193,7 @@ function renderDagVizForJob(svgContainer) {
// Use the link from the stage table so it also works for the history server
var attemptId = 0
var stageLink = d3.select("#stage-" + stageId + "-" + attemptId)
- .select("a")
+ .select("a.name-link")
.attr("href") + "&expandDagViz=true";
container = svgContainer
.append("a")
diff --git a/core/src/main/resources/org/apache/spark/ui/static/timeline-view.js b/core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
index 604c299941..28ac998e8d 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
@@ -105,7 +105,7 @@ function drawJobTimeline(groupArray, eventObjArray, startTime) {
};
$(this).click(function() {
- var stagePagePath = $(getSelectorForStageEntry(this)).find("a").attr("href")
+ var stagePagePath = $(getSelectorForStageEntry(this)).find("a.name-link").attr("href")
window.location.href = stagePagePath
});