Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/20251#discussion_r161268598
--- Diff: core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala ---
@@ -429,20 +429,40 @@ private[ui] class JobDataSource(
val formattedDuration = duration.map(d =>
UIUtils.formatDuration(d)).getOrElse("Unknown")
val submissionTime = jobData.submissionTime
val formattedSubmissionTime =
submissionTime.map(UIUtils.formatDate).getOrElse("Unknown")
- val jobDescription =
UIUtils.makeDescription(jobData.description.getOrElse(""),
- basePath, plainText = false)
+
+ val lastStage = {
+ val stageAttempts = jobData.stageIds.flatMap(store.stageData(_))
+ if (!stageAttempts.isEmpty) {
+ val lastId = stageAttempts.map(_.stageId).max
+ stageAttempts.find(_.stageId == lastId)
+ } else {
+ None
+ }}
+
+ val jobDescription = jobData.description
+ .getOrElse(lastStage.flatMap(_.description).
+ getOrElse(jobData.name))
+
+ val lastStageName = lastStage.map(_.name).getOrElse(jobData.name)
+
+ val lastStageDescription = lastStage.flatMap(_.description)
+ .getOrElse(jobData.description
+ .getOrElse(jobData.name))
--- End diff --
I think you don't need to break this on a new line? it's broken a little
differently than on 442 too.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]