Skip to content
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

[SPARK-22990][Core] Fix method isFairScheduler in JobsTab and StagesTab #20186

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ private[ui] class JobsTab(parent: SparkUI, store: AppStatusStore)
val killEnabled = parent.killEnabled

def isFairScheduler: Boolean = {
store.environmentInfo().sparkProperties.toMap
.get("spark.scheduler.mode")
.map { mode => mode == SchedulingMode.FAIR }
.getOrElse(false)
store
.environmentInfo()
.sparkProperties
.contains(("spark.scheduler.mode", SchedulingMode.FAIR.toString))
}

def getSparkUser: String = parent.getSparkUser
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ private[ui] class StagesTab(val parent: SparkUI, val store: AppStatusStore)
attachPage(new PoolPage(this))

def isFairScheduler: Boolean = {
store.environmentInfo().sparkProperties.toMap
.get("spark.scheduler.mode")
.map { mode => mode == SchedulingMode.FAIR }
.getOrElse(false)
store
.environmentInfo()
.sparkProperties
.contains(("spark.scheduler.mode", SchedulingMode.FAIR.toString))
}

def handleKillRequest(request: HttpServletRequest): Unit = {
Expand Down