diff options
Diffstat (limited to 'core')
3 files changed, 10 insertions, 0 deletions
diff --git a/core/src/main/scala/org/apache/spark/ui/SparkUI.scala b/core/src/main/scala/org/apache/spark/ui/SparkUI.scala index 6057522509..39155ff264 100644 --- a/core/src/main/scala/org/apache/spark/ui/SparkUI.scala +++ b/core/src/main/scala/org/apache/spark/ui/SparkUI.scala @@ -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 = { diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala b/core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala index d5f15f160b..07484c9550 100644 --- a/core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala +++ b/core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala @@ -297,6 +297,10 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") { <div> <ul class="unstyled"> <li> + <strong>User:</strong> + {parent.getSparkUser} + </li> + <li> <strong>Total Uptime:</strong> { if (endTime < 0 && parent.sc.isDefined) { diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala b/core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala index 0d0e9b00d3..7b00b558d5 100644 --- a/core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala +++ b/core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala @@ -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)) } |