Skip to content

Commit 1fef09d

Browse files
author
Marcelo Vanzin
committed
Other feedback.
1 parent 1734dc0 commit 1fef09d

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

core/src/main/scala/org/apache/spark/ui/jobs/JobPage.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ private[ui] class JobPage(parent: JobsTab, store: AppStatusStore) extends WebUIP
334334
val appStartTime = store.applicationInfo().attempts.head.startTime.getTime()
335335

336336
content ++= makeTimeline(activeStages ++ completedStages ++ failedStages,
337-
store.executorList(false), appStartTime)
337+
store.executorList(false), appStartTime)
338338

339339
content ++= UIUtils.showDagVizForJob(
340340
jobId, store.operationGraphForJob(jobId))

core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,10 @@ private[ui] class JobsTab(parent: SparkUI, store: AppStatusStore)
3434
val killEnabled = parent.killEnabled
3535

3636
def isFairScheduler: Boolean = {
37-
val configName = "spark.scheduler.mode"
38-
val config = sc match {
39-
case Some(_sc) =>
40-
_sc.conf.getOption(configName)
41-
case _ =>
42-
store.environmentInfo().sparkProperties.toMap.get(configName)
43-
}
44-
config.map(SchedulingMode.withName) == Some(SchedulingMode.FAIR)
37+
store.environmentInfo().sparkProperties.toMap
38+
.get("spark.scheduler.mode")
39+
.map { mode => mode == SchedulingMode.FAIR }
40+
.getOrElse(false)
4541
}
4642

4743
def getSparkUser: String = parent.getSparkUser

core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ private[ui] class TaskDataSource(
842842
import StagePage._
843843

844844
// Keep an internal cache of executor log maps so that long task lists render faster.
845-
private val executors = new HashMap[String, Map[String, String]]()
845+
private val executorIdToLogs = new HashMap[String, Map[String, String]]()
846846

847847
// Convert TaskData to TaskTableRowData which contains the final contents to show in the table
848848
// so that we can avoid creating duplicate contents during sorting the data
@@ -1006,7 +1006,7 @@ private[ui] class TaskDataSource(
10061006
}
10071007

10081008
private def executorLogs(id: String): Map[String, String] = {
1009-
executors.getOrElseUpdate(id,
1009+
executorIdToLogs.getOrElseUpdate(id,
10101010
store.asOption(store.executorSummary(id)).map(_.executorLogs).getOrElse(Map.empty))
10111011
}
10121012

0 commit comments

Comments
 (0)