Skip to content

Commit 9866fbf

Browse files
committed
Spark UI returns 500 in yarn-client mode
1 parent d1966f3 commit 9866fbf

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ class SparkContext(config: SparkConf) extends Logging {
239239
None
240240
}
241241

242+
ui.foreach(_.bind())
243+
242244
/** A default Hadoop Configuration for the Hadoop code (e.g. file systems) that we reuse. */
243245
val hadoopConfiguration = SparkHadoopUtil.get.newConfiguration(conf)
244246

@@ -341,10 +343,6 @@ class SparkContext(config: SparkConf) extends Logging {
341343
postEnvironmentUpdate()
342344
postApplicationStart()
343345

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private[ui] class JobProgressPage(parent: JobProgressTab) extends WebUIPage("")
2929
private val live = parent.live
3030
private val sc = parent.sc
3131
private val listener = parent.listener
32-
private lazy val isFairScheduler = parent.isFairScheduler
32+
private def isFairScheduler = parent.isFairScheduler
3333

3434
def render(request: HttpServletRequest): Seq[Node] = {
3535
listener.synchronized {

0 commit comments

Comments
 (0)