Skip to content
Snippets Groups Projects
Commit 51afde9d authored by GuoQiang Li's avatar GuoQiang Li Committed by Andrew Or
Browse files

[SPARK-4010][Web UI]Spark UI returns 500 in yarn-client mode

The problem caused by #1966
CC YanTangZhai andrewor14

Author: GuoQiang Li <witgo@qq.com>

Closes #2858 from witgo/SPARK-4010 and squashes the following commits:

9866fbf [GuoQiang Li] Spark UI returns 500 in yarn-client mode
parent c7aeecd0
No related branches found
No related tags found
No related merge requests found
......@@ -239,6 +239,10 @@ class SparkContext(config: SparkConf) extends Logging {
None
}
// Bind the UI before starting the task scheduler to communicate
// the bound port to the cluster manager properly
ui.foreach(_.bind())
/** A default Hadoop Configuration for the Hadoop code (e.g. file systems) that we reuse. */
val hadoopConfiguration = SparkHadoopUtil.get.newConfiguration(conf)
......@@ -341,10 +345,6 @@ class SparkContext(config: SparkConf) extends Logging {
postEnvironmentUpdate()
postApplicationStart()
// Bind the SparkUI after starting the task scheduler
// because certain pages and listeners depend on it
ui.foreach(_.bind())
private[spark] var checkpointDir: Option[String] = None
// Thread Local variable that can be used by users to pass information down the stack
......
......@@ -29,7 +29,7 @@ private[ui] class JobProgressPage(parent: JobProgressTab) extends WebUIPage("")
private val live = parent.live
private val sc = parent.sc
private val listener = parent.listener
private lazy val isFairScheduler = parent.isFairScheduler
private def isFairScheduler = parent.isFairScheduler
def render(request: HttpServletRequest): Seq[Node] = {
listener.synchronized {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment