Skip to content

Commit 35875e9

Browse files
YanTangZhaiandrewor14
authored andcommitted
[SPARK-3067] JobProgressPage could not show Fair Scheduler Pools section sometimes
JobProgressPage could not show Fair Scheduler Pools section sometimes. SparkContext starts webui and then postEnvironmentUpdate. Sometimes JobProgressPage is accessed between webui starting and postEnvironmentUpdate, then the lazy val isFairScheduler will be false. The Fair Scheduler Pools section will not display any more. Author: yantangzhai <[email protected]> Author: YanTangZhai <[email protected]> Closes apache#1966 from YanTangZhai/SPARK-3067 and squashes the following commits: d4323f8 [yantangzhai] update [SPARK-3067] JobProgressPage could not show Fair Scheduler Pools section sometimes 8a00106 [YanTangZhai] Merge pull request #6 from apache/master b6391cc [yantangzhai] revert [SPARK-3067] JobProgressPage could not show Fair Scheduler Pools section sometimes d2226cd [yantangzhai] [SPARK-3067] JobProgressPage could not show Fair Scheduler Pools section sometimes cbcba66 [YanTangZhai] Merge pull request #3 from apache/master aac7f7b [yantangzhai] [SPARK-3067] JobProgressPage could not show Fair Scheduler Pools section sometimes cdef539 [YanTangZhai] Merge pull request #1 from apache/master (cherry picked from commit dedace8) Signed-off-by: Andrew Or <[email protected]>
1 parent 2c41170 commit 35875e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/main/scala/org/apache/spark/SparkContext.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ class SparkContext(config: SparkConf) extends Logging {
228228
// For tests, do not enable the UI
229229
None
230230
}
231-
ui.foreach(_.bind())
232231

233232
/** A default Hadoop Configuration for the Hadoop code (e.g. file systems) that we reuse. */
234233
val hadoopConfiguration: Configuration = {
@@ -341,6 +340,10 @@ class SparkContext(config: SparkConf) extends Logging {
341340
postEnvironmentUpdate()
342341
postApplicationStart()
343342

343+
// Bind the SparkUI after starting the task scheduler
344+
// because certain pages and listeners depend on it
345+
ui.foreach(_.bind())
346+
344347
private[spark] var checkpointDir: Option[String] = None
345348

346349
// Thread Local variable that can be used by users to pass information down the stack

0 commit comments

Comments
 (0)