Skip to content

Commit a1ee6f1

Browse files
Marcelo Vanzinsameeragarwal
authored andcommitted
[SPARK-23470][UI] Use first attempt of last stage to define job description.
This is much faster than finding out what the last attempt is, and the data should be the same. There's room for improvement in this page (like only loading data for the jobs being shown, instead of loading all available jobs and sorting them), but this should bring performance on par with the 2.2 version. Author: Marcelo Vanzin <[email protected]> Closes #20644 from vanzin/SPARK-23470. (cherry picked from commit 2ba77ed) Signed-off-by: Sameer Agarwal <[email protected]>
1 parent c7a0dea commit a1ee6f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ private[ui] object ApiHelper {
10401040
}
10411041

10421042
def lastStageNameAndDescription(store: AppStatusStore, job: JobData): (String, String) = {
1043-
val stage = store.asOption(store.lastStageAttempt(job.stageIds.max))
1043+
val stage = store.asOption(store.stageAttempt(job.stageIds.max, 0))
10441044
(stage.map(_.name).getOrElse(""), stage.flatMap(_.description).getOrElse(job.name))
10451045
}
10461046

0 commit comments

Comments
 (0)