Skip to content

Commit a3394e4

Browse files
iRaksonsrowen
authored andcommitted
[SPARK-29477] Improve tooltip for Streaming tab
### What changes were proposed in this pull request? Added tooltip for duration columns in the batch table of streaming tab of Web UI. ### Why are the changes needed? Tooltips will help users in understanding columns of batch table of streaming tab. ### Does this PR introduce any user-facing change? Yes ### How was this patch tested? Manually tested. Closes apache#26467 from iRakson/streaming_tab_tooltip. Authored-by: root1 <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent 8c2849a commit a3394e4

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

streaming/src/main/scala/org/apache/spark/streaming/ui/BatchPage.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ private[ui] class BatchPage(parent: StreamingTab) extends WebUIPage("batch") {
3737
private def columns: Seq[Node] = {
3838
<th>Output Op Id</th>
3939
<th>Description</th>
40-
<th>Output Op Duration</th>
40+
<th>Output Op Duration {SparkUIUtils.tooltip("Time taken for all the jobs of this batch to" +
41+
" finish processing from the time they were submitted.",
42+
"top")}</th>
4143
<th>Status</th>
4244
<th>Job Id</th>
43-
<th>Job Duration</th>
45+
<th>Job Duration {SparkUIUtils.tooltip("Time taken from submission time to completion " +
46+
"time of the job", "top")}</th>
4447
<th class="sorttable_nosort">Stages: Succeeded/Total</th>
4548
<th class="sorttable_nosort">Tasks (for all stages): Succeeded/Total</th>
4649
<th>Error</th>
@@ -381,7 +384,7 @@ private[ui] class BatchPage(parent: StreamingTab) extends WebUIPage("batch") {
381384
<thead>
382385
<tr>
383386
<th>Input</th>
384-
<th>Metadata</th>
387+
<th>Metadata {SparkUIUtils.tooltip("Batch Input Details", "right")}</th>
385388
</tr>
386389
</thead>
387390
<tbody>

streaming/src/test/scala/org/apache/spark/streaming/UISeleniumSuite.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ class UISeleniumSuite
151151
summaryText should contain ("Total delay:")
152152

153153
findAll(cssSelector("""#batch-job-table th""")).map(_.text).toSeq should be {
154-
List("Output Op Id", "Description", "Output Op Duration", "Status", "Job Id",
155-
"Job Duration", "Stages: Succeeded/Total", "Tasks (for all stages): Succeeded/Total",
154+
List("Output Op Id", "Description", "Output Op Duration (?)", "Status", "Job Id",
155+
"Job Duration (?)", "Stages: Succeeded/Total",
156+
"Tasks (for all stages): Succeeded/Total",
156157
"Error")
157158
}
158159

@@ -163,7 +164,7 @@ class UISeleniumSuite
163164

164165
// Check job ids
165166
val jobIdCells = findAll(cssSelector( """#batch-job-table a""")).toSeq
166-
jobIdCells.map(_.text) should be (List("0", "1", "2", "3"))
167+
jobIdCells.map(_.text).filter(_.forall(_.isDigit)) should be (List("0", "1", "2", "3"))
167168

168169
val jobLinks = jobIdCells.flatMap(_.attribute("href"))
169170
jobLinks.size should be (4)

0 commit comments

Comments
 (0)