Skip to content

Commit

Permalink
Add some tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
mateiz committed May 8, 2015
1 parent 4c5a364 commit def38d0
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ div#application-timeline, div#job-timeline {
stroke: #36F572;
}

.vis.timeline .foreground {
cursor: move;
}

.vis.timeline .item.job {
cursor: pointer;
}
Expand Down
19 changes: 19 additions & 0 deletions core/src/main/scala/org/apache/spark/ui/ToolTips.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,23 @@ private[spark] object ToolTips {
val GC_TIME =
"""Time that the executor spent paused for Java garbage collection while the task was
running."""

val JOB_TIMELINE =
"""Shows when jobs started and ended and when executors joined or left. Drag to scroll.
Click Enable Zooming and use mouse wheel to zoom in/out."""

val STAGE_TIMELINE =
"""Shows when stages started and ended and when executors joined or left. Drag to scroll.
Click Enable Zooming and use mouse wheel to zoom in/out."""

val JOB_DAG =
"""Shows a graph of stages executed for this job, each of which can contain
multiple RDD operations (e.g. map() and filter()), and of RDDs inside each operation
(shown as dots)."""

val STAGE_DAG =
"""Shows a graph of RDD operations in this stage, and RDDs inside each one. A stage can run
multiple operations (e.g. two map() functions) if they can be pipelined. Some operations
also create multiple RDDs internally. Cached RDDs are shown in green.
"""
}
5 changes: 4 additions & 1 deletion core/src/main/scala/org/apache/spark/ui/UIUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ private[spark] object UIUtils extends Logging {
<div>
<span class="expand-dag-viz" onclick={s"toggleDagViz($forJob);"}>
<span class="expand-dag-viz-arrow arrow-closed"></span>
<a>DAG Visualization</a>
<a data-toggle="tooltip" title={if (forJob) ToolTips.JOB_DAG else ToolTips.STAGE_DAG}
data-placement="right">
DAG Visualization
</a>
</span>
<div id="dag-viz-graph"></div>
<div id="dag-viz-metadata">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import scala.xml.{Node, NodeSeq, Unparsed, Utility}
import java.util.Date
import javax.servlet.http.HttpServletRequest

import org.apache.spark.ui.{UIUtils, WebUIPage}
import org.apache.spark.ui.{ToolTips, UIUtils, WebUIPage}
import org.apache.spark.ui.jobs.UIData.{ExecutorUIData, JobUIData}
import org.apache.spark.JobExecutionStatus

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

<span class="expand-application-timeline">
<span class="expand-application-timeline-arrow arrow-closed"></span>
<a>Event Timeline</a>
<a data-toggle="tooltip" title={ToolTips.JOB_TIMELINE} data-placement="right">
Event Timeline
</a>
</span> ++
<div id="application-timeline" class="collapsed">
<div class="control-panel">
Expand Down Expand Up @@ -334,7 +336,7 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
failedJobsTable
}

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

UIUtils.headerSparkPage("Spark Jobs", content, parent, helpText = Some(helpText))
Expand Down
6 changes: 4 additions & 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 @@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletRequest

import org.apache.spark.JobExecutionStatus
import org.apache.spark.scheduler.StageInfo
import org.apache.spark.ui.{UIUtils, WebUIPage}
import org.apache.spark.ui.{ToolTips, UIUtils, WebUIPage}
import org.apache.spark.ui.jobs.UIData.ExecutorUIData

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

<span class="expand-job-timeline">
<span class="expand-job-timeline-arrow arrow-closed"></span>
<a>Event Timeline</a>
<a data-toggle="tooltip" title={ToolTips.STAGE_TIMELINE} data-placement="right">
Event Timeline
</a>
</span> ++
<div id="job-timeline" class="collapsed">
<div class="control-panel">
Expand Down

0 comments on commit def38d0

Please sign in to comment.