1. [SPARK-28430][UI] Fix stage table rendering when some tasks' metrics are (commit: e466662d5c08e2030b727468001561ab4c21078b) (details)
Commit e466662d5c08e2030b727468001561ab4c21078b by dhyun
[SPARK-28430][UI] Fix stage table rendering when some tasks' metrics are
## What changes were proposed in this pull request?
The Spark UI's stages table misrenders the input/output metrics columns
when some tasks are missing input metrics. See the screenshot below for
an example of the problem:
This is because those columns' are defined as
{if (hasInput(stage)) {
metricInfo(task) { m =>
where `metricInfo` renders the node returned by the closure in case
metrics are defined or returns `Nil` in case metrics are not defined. If
metrics are undefined then we'll fail to render the empty `<td></td>`
tag, causing columns to become misaligned as shown in the screenshot.
To fix this, this patch changes this to
{if (hasInput(stage)) {
   metricInfo(task) { m =>
which is an idiom that's already in use for the shuffle read / write
## How was this patch tested?
It isn't. I'm arguing for correctness because the modifications are
consistent with rendering methods that work correctly for other columns.
Closes #25183 from
Authored-by: Josh Rosen <> Signed-off-by: Dongjoon
Hyun <>
(cherry picked from commit 3776fbdfdeac07d191f231b29cf906cabdc6de3f)
Signed-off-by: Dongjoon Hyun <>
(commit: e466662d5c08e2030b727468001561ab4c21078b)
The file was modifiedcore/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala (diff)