You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2014/07/24 23:13:06 UTC

git commit: SPARK-2250: show stage RDDs in UI

Repository: spark
Updated Branches:
  refs/heads/master 323a83c52 -> fec641b84


SPARK-2250: show stage RDDs in UI

Author: Neville Li <ne...@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


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

Branch: refs/heads/master
Commit: fec641b84d37848b329bba91857240ac5b87fc54
Parents: 323a83c
Author: Neville Li <ne...@spotify.com>
Authored: Thu Jul 24 14:13:00 2014 -0700
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Thu Jul 24 14:13:00 2014 -0700

----------------------------------------------------------------------
 .../org/apache/spark/ui/jobs/StageTable.scala   | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/fec641b8/core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala b/core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala
index 5f45c0c..f8b308c 100644
--- a/core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala
+++ b/core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala
@@ -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>
     }