Skip to content
Snippets Groups Projects
Commit 2387f1e3 authored by Kent Yao's avatar Kent Yao Committed by Sean Owen
Browse files

[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 <yaooqinn@hotmail.com>

Closes #18893 from yaooqinn/SPARK-21675.
parent 584c7f14
No related branches found
No related tags found
No related merge requests found
...@@ -94,14 +94,16 @@ private[ui] trait PagedTable[T] { ...@@ -94,14 +94,16 @@ private[ui] trait PagedTable[T] {
val _dataSource = dataSource val _dataSource = dataSource
try { try {
val PageData(totalPages, data) = _dataSource.pageData(page) val PageData(totalPages, data) = _dataSource.pageData(page)
val pageNavi = pageNavigation(page, _dataSource.pageSize, totalPages)
<div> <div>
{pageNavigation(page, _dataSource.pageSize, totalPages)} {pageNavi}
<table class={tableCssClass} id={tableId}> <table class={tableCssClass} id={tableId}>
{headers} {headers}
<tbody> <tbody>
{data.map(row)} {data.map(row)}
</tbody> </tbody>
</table> </table>
{pageNavi}
</div> </div>
} catch { } catch {
case e: IndexOutOfBoundsException => case e: IndexOutOfBoundsException =>
......
...@@ -835,7 +835,8 @@ private[ui] class TaskTableRowData( ...@@ -835,7 +835,8 @@ private[ui] class TaskTableRowData(
val speculative: Boolean, val speculative: Boolean,
val status: String, val status: String,
val taskLocality: String, val taskLocality: String,
val executorIdAndHost: String, val executorId: String,
val host: String,
val launchTime: Long, val launchTime: Long,
val duration: Long, val duration: Long,
val formatDuration: String, val formatDuration: String,
...@@ -1017,7 +1018,8 @@ private[ui] class TaskDataSource( ...@@ -1017,7 +1018,8 @@ private[ui] class TaskDataSource(
info.speculative, info.speculative,
info.status, info.status,
info.taskLocality.toString, info.taskLocality.toString,
s"${info.executorId} / ${info.host}", info.executorId,
info.host,
info.launchTime, info.launchTime,
duration, duration,
formatDuration, formatDuration,
...@@ -1047,7 +1049,8 @@ private[ui] class TaskDataSource( ...@@ -1047,7 +1049,8 @@ private[ui] class TaskDataSource(
case "Attempt" => Ordering.by(_.attempt) case "Attempt" => Ordering.by(_.attempt)
case "Status" => Ordering.by(_.status) case "Status" => Ordering.by(_.status)
case "Locality Level" => Ordering.by(_.taskLocality) case "Locality Level" => Ordering.by(_.taskLocality)
case "Executor ID / Host" => Ordering.by(_.executorIdAndHost) case "Executor ID" => Ordering.by(_.executorId)
case "Host" => Ordering.by(_.host)
case "Launch Time" => Ordering.by(_.launchTime) case "Launch Time" => Ordering.by(_.launchTime)
case "Duration" => Ordering.by(_.duration) case "Duration" => Ordering.by(_.duration)
case "Scheduler Delay" => Ordering.by(_.schedulerDelay) case "Scheduler Delay" => Ordering.by(_.schedulerDelay)
...@@ -1200,7 +1203,7 @@ private[ui] class TaskPagedTable( ...@@ -1200,7 +1203,7 @@ private[ui] class TaskPagedTable(
val taskHeadersAndCssClasses: Seq[(String, String)] = val taskHeadersAndCssClasses: Seq[(String, String)] =
Seq( Seq(
("Index", ""), ("ID", ""), ("Attempt", ""), ("Status", ""), ("Locality Level", ""), ("Index", ""), ("ID", ""), ("Attempt", ""), ("Status", ""), ("Locality Level", ""),
("Executor ID / Host", ""), ("Launch Time", ""), ("Duration", ""), ("Executor ID", ""), ("Host", ""), ("Launch Time", ""), ("Duration", ""),
("Scheduler Delay", TaskDetailsClassNames.SCHEDULER_DELAY), ("Scheduler Delay", TaskDetailsClassNames.SCHEDULER_DELAY),
("Task Deserialization Time", TaskDetailsClassNames.TASK_DESERIALIZATION_TIME), ("Task Deserialization Time", TaskDetailsClassNames.TASK_DESERIALIZATION_TIME),
("GC Time", ""), ("GC Time", ""),
...@@ -1271,8 +1274,9 @@ private[ui] class TaskPagedTable( ...@@ -1271,8 +1274,9 @@ private[ui] class TaskPagedTable(
<td>{if (task.speculative) s"${task.attempt} (speculative)" else task.attempt.toString}</td> <td>{if (task.speculative) s"${task.attempt} (speculative)" else task.attempt.toString}</td>
<td>{task.status}</td> <td>{task.status}</td>
<td>{task.taskLocality}</td> <td>{task.taskLocality}</td>
<td>{task.executorId}</td>
<td> <td>
<div style="float: left">{task.executorIdAndHost}</div> <div style="float: left">{task.host}</div>
<div style="float: right"> <div style="float: right">
{ {
task.logs.map { task.logs.map {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment