Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/20330#discussion_r162764494
--- Diff: core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala ---
@@ -1002,4 +1000,12 @@ private object ApiHelper {
}
}
+ def lastStageNameAndDescription(store: AppStatusStore, job: JobData):
(String, String) = {
+ store.asOption(store.lastStageAttempt(job.stageIds.max)) match {
+ case Some(lastStageAttempt) =>
+ (lastStageAttempt.name,
lastStageAttempt.description.getOrElse(job.name))
+ case None => ("", "")
--- End diff --
This would probably be simpler:
```
val stage = store.asOption(...)
(stage.map(_.name).getOrElse(""),
stage.map(_.description.getOrElse(job.name)))
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]