Skip to content
Snippets Groups Projects
Commit 35e0db2d authored by Alex Bozarth's avatar Alex Bozarth Committed by Tom Graves
Browse files

[SPARK-14245][WEB UI] Display the user in the application view

## What changes were proposed in this pull request?

The Spark UI (both active and history) should show the user who ran the application somewhere when you are in the application view. This was added under the Jobs view by total uptime and scheduler mode.

## How was this patch tested?

Manual testing

<img width="191" alt="username" src="https://cloud.githubusercontent.com/assets/13952758/14222830/6d1fe542-f82a-11e5-885f-c05ee2cdf857.png">

Author: Alex Bozarth <ajbozart@us.ibm.com>

Closes #12123 from ajbozarth/spark14245.
parent db75ccb5
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,10 @@ private[spark] class SparkUI private (
}
initialize()
def getSparkUser: String = {
environmentListener.systemProperties.toMap.get("user.name").getOrElse("<unknown>")
}
def getAppName: String = appName
def setAppId(id: String): Unit = {
......
......@@ -296,6 +296,10 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
val summary: NodeSeq =
<div>
<ul class="unstyled">
<li>
<strong>User:</strong>
{parent.getSparkUser}
</li>
<li>
<strong>Total Uptime:</strong>
{
......
......@@ -31,6 +31,8 @@ private[ui] class JobsTab(parent: SparkUI) extends SparkUITab(parent, "jobs") {
def isFairScheduler: Boolean =
jobProgresslistener.schedulingMode == Some(SchedulingMode.FAIR)
def getSparkUser: String = parent.getSparkUser
attachPage(new AllJobsPage(this))
attachPage(new JobPage(this))
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment