Github user andrewor14 commented on a diff in the pull request: https://github.com/apache/spark/pull/42#discussion_r10284428 --- Diff: core/src/main/scala/org/apache/spark/ui/SparkUI.scala --- @@ -17,38 +17,80 @@ package org.apache.spark.ui +import java.io.{FileInputStream, File} + +import scala.io.Source + +import it.unimi.dsi.fastutil.io.FastBufferedInputStream import org.eclipse.jetty.server.{Handler, Server} +import org.json4s.jackson.JsonMethods._ import org.apache.spark.{Logging, SparkContext, SparkEnv} +import org.apache.spark.scheduler._ import org.apache.spark.ui.JettyUtils._ import org.apache.spark.ui.env.EnvironmentUI import org.apache.spark.ui.exec.ExecutorsUI import org.apache.spark.ui.jobs.JobProgressUI import org.apache.spark.ui.storage.BlockManagerUI import org.apache.spark.util.Utils +import org.apache.spark.util.JsonProtocol -/** Top level user interface for Spark */ -private[spark] class SparkUI(sc: SparkContext) extends Logging { +/** Top level user interface for Spark. */ +private[spark] class SparkUI(val sc: SparkContext) extends Logging { --- End diff -- Having an ```Option[SparkContext]``` argument means we have to do ```new SparkUI(Some(this)) ``` from SparkContext, which seems strange to me. To hide the ugliness of null SparkContexts, I think a better way is to make a new constructor that looks something like ```def this() = this(null)```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---