Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6b3403b
Scope all RDD methods
Apr 17, 2015
a9ed4f9
Add a few missing scopes to certain RDD methods
Apr 17, 2015
5143523
Expose the necessary information in RDDInfo
Apr 17, 2015
2184348
Translate RDD information to dot file
Apr 17, 2015
f22f337
First working implementation of visualization with vis.js
Apr 17, 2015
9fac6f3
Re-implement scopes through annotations instead
Apr 22, 2015
494d5c2
Revert a few unintended style changes
Apr 22, 2015
6a7cdca
Move RDD scope util methods and logic to its own file
Apr 22, 2015
5e22946
Merge branch 'master' of github.com:apache/spark into viz
Apr 22, 2015
205f838
Reimplement rendering with dagre-d3 instead of viz.js
Apr 23, 2015
fe7816f
Merge branch 'master' of github.com:apache/spark into viz
Apr 27, 2015
8dd5af2
Fill in documentation + miscellaneous minor changes
Apr 27, 2015
71281fa
Embed the viz in the UI in a toggleable manner
Apr 27, 2015
09d361e
Add ID to node label (minor)
Apr 27, 2015
52187fc
Rat excludes
Apr 28, 2015
c3bfcae
Re-implement scopes using closures instead of annotations
Apr 27, 2015
aa868a9
Ensure that HadoopRDD is actually serializable
Apr 27, 2015
4310271
Merge branch 'master' of github.com:apache/spark into viz2
Apr 28, 2015
7ef957c
Fix scala style
Apr 28, 2015
d19c4da
Merge branch 'master' of github.com:apache/spark into viz2
Apr 28, 2015
6e2cfea
Remove all return statements in `withScope`
Apr 29, 2015
43de96e
Add parent IDs to StageInfo
Apr 29, 2015
5e388ea
Fix line too long
Apr 29, 2015
5f07e9c
Remove more return statements from scopes
Apr 29, 2015
ab91416
Introduce visualization to the Job Page
May 1, 2015
5c7ce16
Connect RDDs across stages + update style
May 1, 2015
deb48a0
Translate stage boxes taking into account the width
May 1, 2015
0706992
Add link from jobs to stages
May 1, 2015
b80cc52
Merge branch 'master' of github.com:apache/spark into viz2
May 3, 2015
f9830a2
Refactor + clean up + document JS visualization code
May 3, 2015
ee33d52
Separate HTML generating code from listener
May 3, 2015
5a7faf4
Rename references to viz scopes to viz clusters
May 4, 2015
83f9c58
Implement a programmatic representation of operator scopes
May 4, 2015
31aae06
Extract visualization logic from listener
May 4, 2015
b1f0fd1
Rename OperatorScope -> RDDOperationScope
May 4, 2015
429e9e1
Display cached RDDs on the viz
May 4, 2015
832443c
Merge branch 'master' of github.com:apache/spark into viz2
May 4, 2015
3459ab2
Fix tests
May 4, 2015
0d7aa32
Fix python tests
May 4, 2015
afb98e2
Merge branch 'master' of github.com:apache/spark into viz2
May 4, 2015
0d07a84
Fix python style
May 4, 2015
5fdd89d
children -> child (minor)
May 4, 2015
3ffe566
Restore "null" as default for RDD name
May 4, 2015
1c310e4
Wrap a few more RDD functions in an operation scope
May 4, 2015
6f9574a
Add tests for RDDOperationScope
May 4, 2015
01ba336
Change RDD cache color to red (minor)
May 4, 2015
666c03b
Round corners of RDD boxes on stage page (minor)
May 4, 2015
5fb429c
Add tooltips to RDDs on job page
May 4, 2015
516c930
Merge branch 'master' of github.com:apache/spark into viz-hover
May 5, 2015
07f25c3
Fix RAT
May 5, 2015
48cb075
Merge branch 'master' of github.com:apache/spark into viz-hover
May 7, 2015
4a15f94
Merge branch 'master' of github.com:apache/spark into viz-hover
May 7, 2015
4fb4545
Fix CSS class selection issue
May 7, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jquery-1.11.1.min.js
d3.min.js
dagre-d3.min.js
graphlib-dot.min.js
tooltipsy.min.js
sorttable.js
vis.min.js
vis.min.css
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,22 @@
fill: #AAAAAA;
}

.dag-viz-rdd-tooltip {
font-size: 11px;
padding: 5px;
color: #fff;
background-color: #444;
-moz-box-shadow: inset 0 0 5px #000;
-webkit-box-shadow: inset 0 0 5px #000;
box-shadow: inset 0 0 10px #000;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
opacity: 0.8;
left: 5px;
top: 50px;
position: relative;
}

/* Stage page specific styles */

#dag-viz-graph svg.stage g.cluster rect {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ function renderDagVizForJob(svgContainer) {
});
});

addRDDTooltips(svgContainer);
drawCrossStageEdges(crossStageEdges, svgContainer);
}

Expand Down Expand Up @@ -424,6 +425,21 @@ function connectRDDs(fromRDDId, toRDDId, edgesContainer, svgContainer) {
edgesContainer.append("path").datum(points).attr("d", line);
}

/* (Job page only) Add tooltips for RDDs. */
function addRDDTooltips(svgContainer) {
var rdds = svgContainer
.selectAll("g.node circle")
.attr("title", function(v) { return d3.select(this.parentNode).attr("name"); });
// Here we cheat a little and use jQuery because it's much easier to use tooltips there
// Note that we can't just use $(...).tooltip() because we're inside an SVG
$(rdds[0]).tooltipsy({
className: "dag-viz-rdd-tooltip",
delay: 0,
show: function (_, e) { e.fadeIn(50); },
hide: function (_, e) { e.fadeOut(50); }
});
}

/* Helper function to convert attributes to numeric values. */
function toFloat(f) {
if (f) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions core/src/main/scala/org/apache/spark/ui/UIUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ private[spark] object UIUtils extends Logging {
<script src={prependBaseUri("/static/d3.min.js")}></script>
<script src={prependBaseUri("/static/dagre-d3.min.js")}></script>
<script src={prependBaseUri("/static/graphlib-dot.min.js")}></script>
<script src={prependBaseUri("/static/tooltipsy.min.js")}></script>
<script src={prependBaseUri("/static/spark-dag-viz.js")}></script>
}

Expand Down Expand Up @@ -330,12 +331,12 @@ private[spark] object UIUtils extends Logging {
}

/** Return a "DAG visualization" DOM element that expands into a visualization for a stage. */
def showDagVizForStage(stageId: Int, graph: Option[RDDOperationGraph]): Seq[Node] = {
def showDagVizForStage(graph: Option[RDDOperationGraph]): Seq[Node] = {
showDagViz(graph.toSeq, forJob = false)
}

/** Return a "DAG visualization" DOM element that expands into a visualization for a job. */
def showDagVizForJob(jobId: Int, graphs: Seq[RDDOperationGraph]): Seq[Node] = {
def showDagVizForJob(graphs: Seq[RDDOperationGraph]): Seq[Node] = {
showDagViz(graphs, forJob = true)
}

Expand Down
3 changes: 1 addition & 2 deletions core/src/main/scala/org/apache/spark/ui/jobs/JobPage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@ private[ui] class JobPage(parent: JobsTab) extends WebUIPage("job") {
content ++= makeTimeline(activeStages ++ completedStages ++ failedStages,
executorListener.executorIdToData, appStartTime)

content ++= UIUtils.showDagVizForJob(
jobId, operationGraphListener.getOperationGraphForJob(jobId))
content ++= UIUtils.showDagVizForJob(operationGraphListener.getOperationGraphForJob(jobId))

if (shouldShowActiveStages) {
content ++= <h4 id="active">Active Stages ({activeStages.size})</h4> ++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private[ui] class StagePage(parent: StagesTab) extends WebUIPage("stage") {
</div>

val dagViz = UIUtils.showDagVizForStage(
stageId, operationGraphListener.getOperationGraphForStage(stageId))
operationGraphListener.getOperationGraphForStage(stageId))

val accumulableHeaders: Seq[String] = Seq("Accumulable", "Value")
def accumulableRow(acc: AccumulableInfo): Elem =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private[ui] object RDDOperationGraph extends Logging {
*/
private def makeDotNode(node: RDDOperationNode, forJob: Boolean): String = {
if (forJob) {
s"""${node.id} [label=" " shape="circle" padding="5" labelStyle="font-size: 0"]"""
s"""${node.id} [label="${node.name}" shape="circle" padding="5" labelStyle="font-size: 0"]"""
} else {
s"""${node.id} [label="${node.name} (${node.id})" padding="5" labelStyle="font-size: 10"]"""
}
Expand Down