Skip to content
Snippets Groups Projects
Commit 84b7fc54 authored by Patrick Wendell's avatar Patrick Wendell
Browse files

Enforcing correct sort order for formatted strings

parent 39e23256
No related branches found
No related tags found
No related merge requests found
......@@ -90,8 +90,10 @@ private[spark] class IndexPage(parent: MasterWebUI) {
<td>{worker.host}:{worker.port}</td>
<td>{worker.state}</td>
<td>{worker.cores} ({worker.coresUsed} Used)</td>
<td>{Utils.memoryMegabytesToString(worker.memory)}
({Utils.memoryMegabytesToString(worker.memoryUsed)} Used)</td>
<td sorttable_customkey={"%s.%s".format(worker.memory, worker.memoryUsed)}>
{Utils.memoryMegabytesToString(worker.memory)}
({Utils.memoryMegabytesToString(worker.memoryUsed)} Used)
</td>
</tr>
}
......@@ -105,7 +107,9 @@ private[spark] class IndexPage(parent: MasterWebUI) {
<td>
{app.coresGranted}
</td>
<td>{Utils.memoryMegabytesToString(app.desc.memoryPerSlave)}</td>
<td sorttable_customkey={app.desc.memoryPerSlave.toString}>
{Utils.memoryMegabytesToString(app.desc.memoryPerSlave)}
</td>
<td>{DeployWebUI.formatDate(app.submitDate)}</td>
<td>{app.desc.user}</td>
<td>{app.state.toString}</td>
......
......@@ -77,7 +77,9 @@ private[spark] class IndexPage(parent: WorkerWebUI) {
<tr>
<td>{executor.execId}</td>
<td>{executor.cores}</td>
<td>{Utils.memoryMegabytesToString(executor.memory)}</td>
<td sorttable_customkey={executor.memory.toString}>
{Utils.memoryMegabytesToString(executor.memory)}
</td>
<td>
<ul class="unstyled">
<li><strong>ID:</strong> {executor.appId}</li>
......
......@@ -93,7 +93,9 @@ private[spark] class StagePage(parent: JobProgressUI) {
val (info, metrics, exception) = taskData
<tr>
<td>{info.taskId}</td>
<td>{Option(metrics).map{m => parent.formatDuration(m.executorRunTime)}.getOrElse("")}</td>
<td sorttable_customkey={Option(metrics).map{m => m.executorRunTime.toString}.getOrElse("1")}>
{Option(metrics).map{m => parent.formatDuration(m.executorRunTime)}.getOrElse("")}
</td>
<td>{info.taskLocality}</td>
<td>{info.hostPort}</td>
<td>{dateFmt.format(new Date(info.launchTime))}</td>
......
......@@ -81,8 +81,12 @@ private[spark] class RDDPage(parent: BlockManagerUI) {
<td>
{block.storageLevel.description}
</td>
<td>{Utils.memoryBytesToString(block.memSize)}</td>
<td>{Utils.memoryBytesToString(block.diskSize)}</td>
<td sorttable_customkey={block.memSize.toString}>
{Utils.memoryBytesToString(block.memSize)}
</td>
<td sorttable_customkey={block.diskSize.toString}>
{Utils.memoryBytesToString(block.diskSize)}
</td>
</tr>
}
......
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