Skip to content
Snippets Groups Projects
Commit 18f29b96 authored by witgo's avatar witgo Committed by Patrick Wendell
Browse files

SPARK-2181:The keys for sorting the columns of Executor page in SparkUI are incorrect

Author: witgo <witgo@qq.com>

Closes #1135 from witgo/SPARK-2181 and squashes the following commits:

39dad90 [witgo] The keys for sorting the columns of Executor page in SparkUI are incorrect
parent c23f5db3
No related branches found
No related tags found
No related merge requests found
...@@ -79,6 +79,7 @@ private[ui] class ExecutorsPage(parent: ExecutorsTab) extends WebUIPage("") { ...@@ -79,6 +79,7 @@ private[ui] class ExecutorsPage(parent: ExecutorsTab) extends WebUIPage("") {
val maximumMemory = values("Maximum Memory") val maximumMemory = values("Maximum Memory")
val memoryUsed = values("Memory Used") val memoryUsed = values("Memory Used")
val diskUsed = values("Disk Used") val diskUsed = values("Disk Used")
// scalastyle:off
<tr> <tr>
<td>{values("Executor ID")}</td> <td>{values("Executor ID")}</td>
<td>{values("Address")}</td> <td>{values("Address")}</td>
...@@ -94,10 +95,11 @@ private[ui] class ExecutorsPage(parent: ExecutorsTab) extends WebUIPage("") { ...@@ -94,10 +95,11 @@ private[ui] class ExecutorsPage(parent: ExecutorsTab) extends WebUIPage("") {
<td>{values("Failed Tasks")}</td> <td>{values("Failed Tasks")}</td>
<td>{values("Complete Tasks")}</td> <td>{values("Complete Tasks")}</td>
<td>{values("Total Tasks")}</td> <td>{values("Total Tasks")}</td>
<td>{Utils.msDurationToString(values("Task Time").toLong)}</td> <td sorttable_customkey={values("Task Time")}>{Utils.msDurationToString(values("Task Time").toLong)}</td>
<td>{Utils.bytesToString(values("Shuffle Read").toLong)}</td> <td sorttable_customkey={values("Shuffle Read")}>{Utils.bytesToString(values("Shuffle Read").toLong)}</td>
<td>{Utils.bytesToString(values("Shuffle Write").toLong)}</td> <td sorttable_customkey={values("Shuffle Write")} >{Utils.bytesToString(values("Shuffle Write").toLong)}</td>
</tr> </tr>
// scalastyle:on
} }
/** Represent an executor's info as a map given a storage status index */ /** Represent an executor's info as a map given a storage status index */
......
...@@ -67,18 +67,20 @@ private[ui] class ExecutorTable(stageId: Int, parent: JobProgressTab) { ...@@ -67,18 +67,20 @@ private[ui] class ExecutorTable(stageId: Int, parent: JobProgressTab) {
executorIdToSummary match { executorIdToSummary match {
case Some(x) => case Some(x) =>
x.toSeq.sortBy(_._1).map { case (k, v) => { x.toSeq.sortBy(_._1).map { case (k, v) => {
// scalastyle:off
<tr> <tr>
<td>{k}</td> <td>{k}</td>
<td>{executorIdToAddress.getOrElse(k, "CANNOT FIND ADDRESS")}</td> <td>{executorIdToAddress.getOrElse(k, "CANNOT FIND ADDRESS")}</td>
<td>{UIUtils.formatDuration(v.taskTime)}</td> <td sorttable_customekey={v.taskTime.toString}>{UIUtils.formatDuration(v.taskTime)}</td>
<td>{v.failedTasks + v.succeededTasks}</td> <td>{v.failedTasks + v.succeededTasks}</td>
<td>{v.failedTasks}</td> <td>{v.failedTasks}</td>
<td>{v.succeededTasks}</td> <td>{v.succeededTasks}</td>
<td>{Utils.bytesToString(v.shuffleRead)}</td> <td sorttable_customekey={v.shuffleRead.toString}>{Utils.bytesToString(v.shuffleRead)}</td>
<td>{Utils.bytesToString(v.shuffleWrite)}</td> <td sorttable_customekey={v.shuffleWrite.toString}>{Utils.bytesToString(v.shuffleWrite)}</td>
<td>{Utils.bytesToString(v.memoryBytesSpilled)}</td> <td sorttable_customekey={v.memoryBytesSpilled.toString} >{Utils.bytesToString(v.memoryBytesSpilled)}</td>
<td>{Utils.bytesToString(v.diskBytesSpilled)}</td> <td sorttable_customekey={v.diskBytesSpilled.toString} >{Utils.bytesToString(v.diskBytesSpilled)}</td>
</tr> </tr>
// scalastyle:on
} }
} }
case _ => Seq[Node]() case _ => Seq[Node]()
......
...@@ -49,6 +49,7 @@ private[ui] class StoragePage(parent: StorageTab) extends WebUIPage("") { ...@@ -49,6 +49,7 @@ private[ui] class StoragePage(parent: StorageTab) extends WebUIPage("") {
/** Render an HTML row representing an RDD */ /** Render an HTML row representing an RDD */
private def rddRow(rdd: RDDInfo): Seq[Node] = { private def rddRow(rdd: RDDInfo): Seq[Node] = {
// scalastyle:off
<tr> <tr>
<td> <td>
<a href={"%s/storage/rdd?id=%s".format(UIUtils.prependBaseUri(basePath), rdd.id)}> <a href={"%s/storage/rdd?id=%s".format(UIUtils.prependBaseUri(basePath), rdd.id)}>
...@@ -59,9 +60,10 @@ private[ui] class StoragePage(parent: StorageTab) extends WebUIPage("") { ...@@ -59,9 +60,10 @@ private[ui] class StoragePage(parent: StorageTab) extends WebUIPage("") {
</td> </td>
<td>{rdd.numCachedPartitions}</td> <td>{rdd.numCachedPartitions}</td>
<td>{"%.0f%%".format(rdd.numCachedPartitions * 100.0 / rdd.numPartitions)}</td> <td>{"%.0f%%".format(rdd.numCachedPartitions * 100.0 / rdd.numPartitions)}</td>
<td>{Utils.bytesToString(rdd.memSize)}</td> <td sorttable_customekey={rdd.memSize.toString}>{Utils.bytesToString(rdd.memSize)}</td>
<td>{Utils.bytesToString(rdd.tachyonSize)}</td> <td sorttable_customekey={rdd.tachyonSize.toString}>{Utils.bytesToString(rdd.tachyonSize)}</td>
<td>{Utils.bytesToString(rdd.diskSize)}</td> <td sorttable_customekey={rdd.diskSize.toString} >{Utils.bytesToString(rdd.diskSize)}</td>
</tr> </tr>
// scalastyle:on
} }
} }
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