Skip to content

Commit

Permalink
[SPARK-45641][UI] Display the application start time on AllJobsPage
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

This PR adds content for the application start time on AllJobsPage.

### Why are the changes needed?

The application start time currently remains in a long value form, which is not convenient for users to read on the environment tab. It's also useful on the AllJobsPage, such as identifying a long pause before job 0 gets scheduled.

### Does this PR introduce _any_ user-facing change?

yes, UI updates

### How was this patch tested?

locally tested

![Screenshot 2023-10-24 at 13 44 19](https://github.com/apache/spark/assets/8326978/d0a7ccf5-43e5-4780-b937-e26ca9a91d36)

### Was this patch authored or co-authored using generative AI tooling?

no

Closes apache#43495 from yaooqinn/SPARK-45641.

Authored-by: Kent Yao <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
  • Loading branch information
yaooqinn authored and dongjoon-hyun committed Oct 24, 2023
1 parent 38222c4 commit 00ee0e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ private[ui] class AllJobsPage(parent: JobsTab, store: AppStatusStore) extends We

def render(request: HttpServletRequest): Seq[Node] = {
val appInfo = store.applicationInfo()
val startTime = appInfo.attempts.head.startTime.getTime()
val startDate = appInfo.attempts.head.startTime
val startTime = startDate.getTime()
val endTime = appInfo.attempts.head.endTime.getTime()

val activeJobs = new ListBuffer[v1.JobData]()
Expand Down Expand Up @@ -327,6 +328,10 @@ private[ui] class AllJobsPage(parent: JobsTab, store: AppStatusStore) extends We
<strong>User:</strong>
{parent.getSparkUser}
</li>
<li>
<strong>Started At:</strong>
{UIUtils.formatDate(startDate)}
</li>
<li>
<strong>Total Uptime:</strong>
{
Expand Down
Binary file modified docs/img/AllJobsPageDetail1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 00ee0e3

Please sign in to comment.