Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Nov 3, 2023
1 parent cdc66a7 commit abd5ab2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/src/main/scala/org/apache/spark/ui/jobs/JobPage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,11 @@ private[ui] class JobPage(parent: JobsTab, store: AppStatusStore) extends WebUIP
}

val isComplete = jobData.status != JobExecutionStatus.RUNNING
val stages = jobData.stageIds.map { stageId =>
val stages = jobData.stageIds.flatMap { stageId =>
val allStageAttempts = store.stageData(stageId).reverse
// This could be empty if the listener hasn't received information about the
// stage or if the stage information has been garbage collected
store.asOption(store.lastStageAttempt(stageId)).getOrElse {
val latestAttempt = allStageAttempts.headOption.getOrElse {
new v1.StageData(
status = v1.StageStatus.PENDING,
stageId = stageId,
Expand Down Expand Up @@ -310,6 +311,7 @@ private[ui] class JobPage(parent: JobsTab, store: AppStatusStore) extends WebUIP
isShufflePushEnabled = false,
shuffleMergersCount = 0)
}
latestAttempt +: allStageAttempts.tail
}

val activeStages = Buffer[v1.StageData]()
Expand Down

0 comments on commit abd5ab2

Please sign in to comment.