Skip to content

Commit ee472fa

Browse files
Baohe Zhangdongjoon-hyun
authored andcommitted
[SPARK-32924][WEBUI] Make duration column in master UI sorted in the correct order
### What changes were proposed in this pull request? Make the "duration" column in standalone mode master UI sorted by numeric duration, hence the column can be sorted by the correct order. Before changes: ![image](https://user-images.githubusercontent.com/26694233/110025426-f5a49300-7cf4-11eb-86f0-2febade86be9.png) After changes: ![image](https://user-images.githubusercontent.com/26694233/110025604-33092080-7cf5-11eb-8b34-215688faf56d.png) ### Why are the changes needed? Fix a UI bug to make the sorting consistent across different pages. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Ran several apps with different durations and verified the duration column on the master page can be sorted correctly. Closes #31743 from baohe-zhang/SPARK-32924. Authored-by: Baohe Zhang <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit 9ac5ee2) Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent b1b31ce commit ee472fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ private[ui] class MasterPage(parent: MasterWebUI) extends WebUIPage("") {
309309
<td>{UIUtils.formatDate(app.submitDate)}</td>
310310
<td>{app.desc.user}</td>
311311
<td>{app.state.toString}</td>
312-
<td>{UIUtils.formatDuration(app.duration)}</td>
312+
<td sorttable_customkey={app.duration.toString}>
313+
{UIUtils.formatDuration(app.duration)}
314+
</td>
313315
</tr>
314316
}
315317

0 commit comments

Comments
 (0)