aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/scala/org/apache/spark/ui/UIUtils.scala12
-rw-r--r--streaming/src/main/scala/org/apache/spark/streaming/ui/AllBatchesTable.scala11
-rw-r--r--streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala6
-rw-r--r--streaming/src/test/scala/org/apache/spark/streaming/UISeleniumSuite.scala6
4 files changed, 21 insertions, 14 deletions
diff --git a/core/src/main/scala/org/apache/spark/ui/UIUtils.scala b/core/src/main/scala/org/apache/spark/ui/UIUtils.scala
index 441c97d6d3..ad16becde8 100644
--- a/core/src/main/scala/org/apache/spark/ui/UIUtils.scala
+++ b/core/src/main/scala/org/apache/spark/ui/UIUtils.scala
@@ -194,11 +194,7 @@ private[spark] object UIUtils extends Logging {
<a href={prependBaseUri(activeTab.basePath, "/" + tab.prefix + "/")}>{tab.name}</a>
</li>
}
- val helpButton: Seq[Node] = helpText.map { helpText =>
- <sup>
- (<a data-toggle="tooltip" data-placement="bottom" title={helpText}>?</a>)
- </sup>
- }.getOrElse(Seq.empty)
+ val helpButton: Seq[Node] = helpText.map(tooltip(_, "bottom")).getOrElse(Seq.empty)
<html>
<head>
@@ -375,6 +371,12 @@ private[spark] object UIUtils extends Logging {
</div>
}
+ def tooltip(text: String, position: String): Seq[Node] = {
+ <sup>
+ (<a data-toggle="tooltip" data-placement={position} title={text}>?</a>)
+ </sup>
+ }
+
/** Return a script element that automatically expands the DAG visualization on page load. */
def expandDagVizOnLoad(forJob: Boolean): Seq[Node] = {
<script type="text/javascript">
diff --git a/streaming/src/main/scala/org/apache/spark/streaming/ui/AllBatchesTable.scala b/streaming/src/main/scala/org/apache/spark/streaming/ui/AllBatchesTable.scala
index 2960b528d4..3619e129ad 100644
--- a/streaming/src/main/scala/org/apache/spark/streaming/ui/AllBatchesTable.scala
+++ b/streaming/src/main/scala/org/apache/spark/streaming/ui/AllBatchesTable.scala
@@ -26,8 +26,11 @@ private[ui] abstract class BatchTableBase(tableId: String) {
protected def columns: Seq[Node] = {
<th>Batch Time</th>
<th>Input Size</th>
- <th>Scheduling Delay</th>
- <th>Processing Time</th>
+ <th>Scheduling Delay
+ {SparkUIUtils.tooltip("Time taken by Streaming scheduler to submit jobs of a batch", "top")}
+ </th>
+ <th>Processing Time
+ {SparkUIUtils.tooltip("Time taken to process all jobs of a batch", "top")}</th>
}
protected def baseRow(batch: BatchUIData): Seq[Node] = {
@@ -99,7 +102,9 @@ private[ui] class ActiveBatchTable(
private[ui] class CompletedBatchTable(batches: Seq[BatchUIData])
extends BatchTableBase("completed-batches-table") {
- override protected def columns: Seq[Node] = super.columns ++ <th>Total Delay</th>
+ override protected def columns: Seq[Node] = super.columns ++
+ <th>Total Delay
+ {SparkUIUtils.tooltip("Total time taken to handle a batch", "top")}</th>
override protected def renderRows: Seq[Node] = {
batches.flatMap(batch => <tr>{completedBatchRow(batch)}</tr>)
diff --git a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala
index ecbebe5c6c..ff0f2b18dc 100644
--- a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala
+++ b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala
@@ -347,7 +347,7 @@ private[ui] class StreamingPage(parent: StreamingTab)
<tr>
<td style="vertical-align: middle;">
<div style="width: 160px;">
- <div><strong>Scheduling Delay</strong></div>
+ <div><strong>Scheduling Delay {SparkUIUtils.tooltip("Time taken by Streaming scheduler to submit jobs of a batch", "right")}</strong></div>
<div>Avg: {schedulingDelay.formattedAvg}</div>
</div>
</td>
@@ -357,7 +357,7 @@ private[ui] class StreamingPage(parent: StreamingTab)
<tr>
<td style="vertical-align: middle;">
<div style="width: 160px;">
- <div><strong>Processing Time</strong></div>
+ <div><strong>Processing Time {SparkUIUtils.tooltip("Time taken to process all jobs of a batch", "right")}</strong></div>
<div>Avg: {processingTime.formattedAvg}</div>
</div>
</td>
@@ -367,7 +367,7 @@ private[ui] class StreamingPage(parent: StreamingTab)
<tr>
<td style="vertical-align: middle;">
<div style="width: 160px;">
- <div><strong>Total Delay</strong></div>
+ <div><strong>Total Delay {SparkUIUtils.tooltip("Total time taken to handle a batch", "right")}</strong></div>
<div>Avg: {totalDelay.formattedAvg}</div>
</div>
</td>
diff --git a/streaming/src/test/scala/org/apache/spark/streaming/UISeleniumSuite.scala b/streaming/src/test/scala/org/apache/spark/streaming/UISeleniumSuite.scala
index 2211f62383..441bbf95d0 100644
--- a/streaming/src/test/scala/org/apache/spark/streaming/UISeleniumSuite.scala
+++ b/streaming/src/test/scala/org/apache/spark/streaming/UISeleniumSuite.scala
@@ -116,12 +116,12 @@ class UISeleniumSuite
h4Text.exists(_.matches("Completed Batches \\(last \\d+ out of \\d+\\)")) should be (true)
findAll(cssSelector("""#active-batches-table th""")).map(_.text).toSeq should be {
- List("Batch Time", "Input Size", "Scheduling Delay", "Processing Time",
+ List("Batch Time", "Input Size", "Scheduling Delay (?)", "Processing Time (?)",
"Status")
}
findAll(cssSelector("""#completed-batches-table th""")).map(_.text).toSeq should be {
- List("Batch Time", "Input Size", "Scheduling Delay", "Processing Time",
- "Total Delay")
+ List("Batch Time", "Input Size", "Scheduling Delay (?)", "Processing Time (?)",
+ "Total Delay (?)")
}
val batchLinks =