Skip to content
Snippets Groups Projects
Commit fec641b8 authored by Neville Li's avatar Neville Li Committed by Patrick Wendell
Browse files

SPARK-2250: show stage RDDs in UI

Author: Neville Li <neville@spotify.com>

Closes #1188 from nevillelyh/neville/ui and squashes the following commits:

d3ac425 [Neville Li] SPARK-2250: show persisted RDD in stage UI
f075db9 [Neville Li] SPARK-2035: show call stack even when description is available
parent 323a83c5
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@
package org.apache.spark.ui.jobs
import scala.xml.Node
import scala.xml.Text
import java.util.Date
......@@ -99,19 +100,30 @@ private[ui] class StageTableBase(
{s.name}
</a>
val cachedRddInfos = s.rddInfos.filter(_.numCachedPartitions > 0)
val details = if (s.details.nonEmpty) {
<span onclick="this.parentNode.querySelector('.stage-details').classList.toggle('collapsed')"
class="expand-details">
+show details
</span>
<pre class="stage-details collapsed">{s.details}</pre>
+details
</span> ++
<div class="stage-details collapsed">
{if (cachedRddInfos.nonEmpty) {
Text("RDD: ") ++
// scalastyle:off
cachedRddInfos.map { i =>
<a href={"%s/storage/rdd?id=%d".format(UIUtils.prependBaseUri(basePath), i.id)}>{i.name}</a>
}
// scalastyle:on
}}
<pre>{s.details}</pre>
</div>
}
val stageDataOption = listener.stageIdToData.get(s.stageId)
// Too many nested map/flatMaps with options are just annoying to read. Do this imperatively.
if (stageDataOption.isDefined && stageDataOption.get.description.isDefined) {
val desc = stageDataOption.get.description
<div><em>{desc}</em></div><div>{nameLink} {killLink}</div>
<div><em>{desc}</em></div><div>{killLink} {nameLink} {details}</div>
} else {
<div>{killLink} {nameLink} {details}</div>
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment