-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-24851][UI] Map a Stage ID to it's Associated Job ID #21809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7be0520
3151a62
a50e8b1
d57e6dc
3a06b87
52b08b2
9eff537
3b73840
0be099a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,7 +105,7 @@ private[ui] class StagePage(parent: StagesTab, store: AppStatusStore) extends We | |
| val stageAttemptId = parameterAttempt.toInt | ||
|
|
||
| val stageHeader = s"Details for Stage $stageId (Attempt $stageAttemptId)" | ||
| val stageData = parent.store | ||
| val (stageData, stageJobIds) = parent.store | ||
| .asOption(parent.store.stageAttempt(stageId, stageAttemptId, details = false)) | ||
| .getOrElse { | ||
| val content = | ||
|
|
@@ -182,6 +182,15 @@ private[ui] class StagePage(parent: StagesTab, store: AppStatusStore) extends We | |
| {Utils.bytesToString(stageData.diskBytesSpilled)} | ||
| </li> | ||
| }} | ||
| {if (!stageJobIds.isEmpty) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could throw an NPE if
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since, we are returning from the code if it is None, it should never reach there as far as I can tell. |
||
| <li> | ||
| <strong>Associated Job Ids: </strong> | ||
| {stageJobIds.map(jobId => {val detailUrl = "%s/jobs/job/?id=%s".format( | ||
| UIUtils.prependBaseUri(request, parent.basePath), jobId) | ||
| <a href={s"${detailUrl}"}>{s"${jobId}"} </a> | ||
| })} | ||
| </li> | ||
| }} | ||
| </ul> | ||
| </div> | ||
|
|
||
|
|
@@ -1047,7 +1056,7 @@ private[ui] object ApiHelper { | |
| } | ||
|
|
||
| def lastStageNameAndDescription(store: AppStatusStore, job: JobData): (String, String) = { | ||
| val stage = store.asOption(store.stageAttempt(job.stageIds.max, 0)) | ||
| val stage = store.asOption(store.stageAttempt(job.stageIds.max, 0)._1) | ||
| (stage.map(_.name).getOrElse(""), stage.flatMap(_.description).getOrElse(job.name)) | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the return type to (StageData, jobIds) might be simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done