Skip to content

Commit

Permalink
[SPARK-7864] [UI] Do not kill innocent stages from visualization
Browse files Browse the repository at this point in the history
**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 <[email protected]>

Closes #6419 from andrewor14/fix-ui-viz-kill and squashes the following commits:

25203bd [Andrew Or] Do not kill innocent stages
  • Loading branch information
Andrew Or committed May 26, 2015
1 parent 836a758 commit 8f20824
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private[ui] class StageTableBase(
}

val nameLinkUri = s"$basePathUri/stages/stage?id=${s.stageId}&attempt=${s.attemptId}"
val nameLink = <a href={nameLinkUri}>{s.name}</a>
val nameLink = <a href={nameLinkUri} class="name-link">{s.name}</a>

val cachedRddInfos = s.rddInfos.filter(_.numCachedPartitions > 0)
val details = if (s.details.nonEmpty) {
Expand Down

0 comments on commit 8f20824

Please sign in to comment.