Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/1135#discussion_r14206483
--- Diff: core/src/main/scala/org/apache/spark/ui/jobs/ExecutorTable.scala
---
@@ -67,18 +67,20 @@ private[ui] class ExecutorTable(stageId: Int, parent:
JobProgressTab) {
executorIdToSummary match {
case Some(x) =>
x.toSeq.sortBy(_._1).map { case (k, v) => {
+ // scalastyle:off
<tr>
<td>{k}</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}</td>
<td>{v.succeededTasks}</td>
- <td>{Utils.bytesToString(v.shuffleRead)}</td>
- <td>{Utils.bytesToString(v.shuffleWrite)}</td>
- <td>{Utils.bytesToString(v.memoryBytesSpilled)}</td>
- <td>{Utils.bytesToString(v.diskBytesSpilled)}</td>
+ <td
sorttable_customekey={v.shuffleRead.toString}>{Utils.bytesToString(v.shuffleRead)}</td>
--- End diff --
sorttable accepts the custom keys as HTML attributes, so they are untyped
(they are strings). However, I think it tries to infer the data type so it will
e.g. correctly covert them to integers.
The issue in the code here is that Scala's XML DSL only allows you to
interpolate string expressions. So I think it's fine to call "toString" on
these when we pass them to XML.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---