Skip to content

Commit 2387f1e

Browse files
yaooqinnsrowen
authored andcommitted
[SPARK-21675][WEBUI] Add a navigation bar at the bottom of the Details for Stage Page
## What changes were proposed in this pull request? 1. In Spark Web UI, the Details for Stage Page don't have a navigation bar at the bottom. When we drop down to the bottom, it is better for us to see a navi bar right there to go wherever we what. 2. Executor ID is not equivalent to Host, it may be better to separate them, and then we can group the tasks by Hosts . ## How was this patch tested? manually test ![wx20170809-165606](https://user-images.githubusercontent.com/8326978/29114161-f82b4920-7d25-11e7-8d0c-0c036b008a78.png) Please review http://spark.apache.org/contributing.html before opening a pull request. Author: Kent Yao <[email protected]> Closes apache#18893 from yaooqinn/SPARK-21675.
1 parent 584c7f1 commit 2387f1e

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,16 @@ private[ui] trait PagedTable[T] {
9494
val _dataSource = dataSource
9595
try {
9696
val PageData(totalPages, data) = _dataSource.pageData(page)
97+
val pageNavi = pageNavigation(page, _dataSource.pageSize, totalPages)
9798
<div>
98-
{pageNavigation(page, _dataSource.pageSize, totalPages)}
99+
{pageNavi}
99100
<table class={tableCssClass} id={tableId}>
100101
{headers}
101102
<tbody>
102103
{data.map(row)}
103104
</tbody>
104105
</table>
106+
{pageNavi}
105107
</div>
106108
} catch {
107109
case e: IndexOutOfBoundsException =>

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,8 @@ private[ui] class TaskTableRowData(
835835
val speculative: Boolean,
836836
val status: String,
837837
val taskLocality: String,
838-
val executorIdAndHost: String,
838+
val executorId: String,
839+
val host: String,
839840
val launchTime: Long,
840841
val duration: Long,
841842
val formatDuration: String,
@@ -1017,7 +1018,8 @@ private[ui] class TaskDataSource(
10171018
info.speculative,
10181019
info.status,
10191020
info.taskLocality.toString,
1020-
s"${info.executorId} / ${info.host}",
1021+
info.executorId,
1022+
info.host,
10211023
info.launchTime,
10221024
duration,
10231025
formatDuration,
@@ -1047,7 +1049,8 @@ private[ui] class TaskDataSource(
10471049
case "Attempt" => Ordering.by(_.attempt)
10481050
case "Status" => Ordering.by(_.status)
10491051
case "Locality Level" => Ordering.by(_.taskLocality)
1050-
case "Executor ID / Host" => Ordering.by(_.executorIdAndHost)
1052+
case "Executor ID" => Ordering.by(_.executorId)
1053+
case "Host" => Ordering.by(_.host)
10511054
case "Launch Time" => Ordering.by(_.launchTime)
10521055
case "Duration" => Ordering.by(_.duration)
10531056
case "Scheduler Delay" => Ordering.by(_.schedulerDelay)
@@ -1200,7 +1203,7 @@ private[ui] class TaskPagedTable(
12001203
val taskHeadersAndCssClasses: Seq[(String, String)] =
12011204
Seq(
12021205
("Index", ""), ("ID", ""), ("Attempt", ""), ("Status", ""), ("Locality Level", ""),
1203-
("Executor ID / Host", ""), ("Launch Time", ""), ("Duration", ""),
1206+
("Executor ID", ""), ("Host", ""), ("Launch Time", ""), ("Duration", ""),
12041207
("Scheduler Delay", TaskDetailsClassNames.SCHEDULER_DELAY),
12051208
("Task Deserialization Time", TaskDetailsClassNames.TASK_DESERIALIZATION_TIME),
12061209
("GC Time", ""),
@@ -1271,8 +1274,9 @@ private[ui] class TaskPagedTable(
12711274
<td>{if (task.speculative) s"${task.attempt} (speculative)" else task.attempt.toString}</td>
12721275
<td>{task.status}</td>
12731276
<td>{task.taskLocality}</td>
1277+
<td>{task.executorId}</td>
12741278
<td>
1275-
<div style="float: left">{task.executorIdAndHost}</div>
1279+
<div style="float: left">{task.host}</div>
12761280
<div style="float: right">
12771281
{
12781282
task.logs.map {

0 commit comments

Comments
 (0)