Skip to content

Commit def38d0

Browse files
committed
Add some tooltips
1 parent 4c5a364 commit def38d0

File tree

5 files changed

+36
-6
lines changed

5 files changed

+36
-6
lines changed

core/src/main/resources/org/apache/spark/ui/static/timeline-view.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ div#application-timeline, div#job-timeline {
8383
stroke: #36F572;
8484
}
8585

86+
.vis.timeline .foreground {
87+
cursor: move;
88+
}
89+
8690
.vis.timeline .item.job {
8791
cursor: pointer;
8892
}

core/src/main/scala/org/apache/spark/ui/ToolTips.scala

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,23 @@ private[spark] object ToolTips {
5757
val GC_TIME =
5858
"""Time that the executor spent paused for Java garbage collection while the task was
5959
running."""
60+
61+
val JOB_TIMELINE =
62+
"""Shows when jobs started and ended and when executors joined or left. Drag to scroll.
63+
Click Enable Zooming and use mouse wheel to zoom in/out."""
64+
65+
val STAGE_TIMELINE =
66+
"""Shows when stages started and ended and when executors joined or left. Drag to scroll.
67+
Click Enable Zooming and use mouse wheel to zoom in/out."""
68+
69+
val JOB_DAG =
70+
"""Shows a graph of stages executed for this job, each of which can contain
71+
multiple RDD operations (e.g. map() and filter()), and of RDDs inside each operation
72+
(shown as dots)."""
73+
74+
val STAGE_DAG =
75+
"""Shows a graph of RDD operations in this stage, and RDDs inside each one. A stage can run
76+
multiple operations (e.g. two map() functions) if they can be pipelined. Some operations
77+
also create multiple RDDs internally. Cached RDDs are shown in green.
78+
"""
6079
}

core/src/main/scala/org/apache/spark/ui/UIUtils.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,10 @@ private[spark] object UIUtils extends Logging {
350350
<div>
351351
<span class="expand-dag-viz" onclick={s"toggleDagViz($forJob);"}>
352352
<span class="expand-dag-viz-arrow arrow-closed"></span>
353-
<a>DAG Visualization</a>
353+
<a data-toggle="tooltip" title={if (forJob) ToolTips.JOB_DAG else ToolTips.STAGE_DAG}
354+
data-placement="right">
355+
DAG Visualization
356+
</a>
354357
</span>
355358
<div id="dag-viz-graph"></div>
356359
<div id="dag-viz-metadata">

core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import scala.xml.{Node, NodeSeq, Unparsed, Utility}
2323
import java.util.Date
2424
import javax.servlet.http.HttpServletRequest
2525

26-
import org.apache.spark.ui.{UIUtils, WebUIPage}
26+
import org.apache.spark.ui.{ToolTips, UIUtils, WebUIPage}
2727
import org.apache.spark.ui.jobs.UIData.{ExecutorUIData, JobUIData}
2828
import org.apache.spark.JobExecutionStatus
2929

@@ -183,7 +183,9 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
183183

184184
<span class="expand-application-timeline">
185185
<span class="expand-application-timeline-arrow arrow-closed"></span>
186-
<a>Event Timeline</a>
186+
<a data-toggle="tooltip" title={ToolTips.JOB_TIMELINE} data-placement="right">
187+
Event Timeline
188+
</a>
187189
</span> ++
188190
<div id="application-timeline" class="collapsed">
189191
<div class="control-panel">
@@ -334,7 +336,7 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
334336
failedJobsTable
335337
}
336338

337-
val helpText = """A job is triggered by an action, like "count()" or "saveAsTextFile()".""" +
339+
val helpText = """A job is triggered by an action, like count() or saveAsTextFile().""" +
338340
" Click on a job to see information about the stages of tasks inside it."
339341

340342
UIUtils.headerSparkPage("Spark Jobs", content, parent, helpText = Some(helpText))

core/src/main/scala/org/apache/spark/ui/jobs/JobPage.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletRequest
2626

2727
import org.apache.spark.JobExecutionStatus
2828
import org.apache.spark.scheduler.StageInfo
29-
import org.apache.spark.ui.{UIUtils, WebUIPage}
29+
import org.apache.spark.ui.{ToolTips, UIUtils, WebUIPage}
3030
import org.apache.spark.ui.jobs.UIData.ExecutorUIData
3131

3232
/** Page showing statistics and stage list for a given job */
@@ -164,7 +164,9 @@ private[ui] class JobPage(parent: JobsTab) extends WebUIPage("job") {
164164

165165
<span class="expand-job-timeline">
166166
<span class="expand-job-timeline-arrow arrow-closed"></span>
167-
<a>Event Timeline</a>
167+
<a data-toggle="tooltip" title={ToolTips.STAGE_TIMELINE} data-placement="right">
168+
Event Timeline
169+
</a>
168170
</span> ++
169171
<div id="job-timeline" class="collapsed">
170172
<div class="control-panel">

0 commit comments

Comments
 (0)