spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwendell <...@git.apache.org>
Subject [GitHub] spark pull request: [WIP] [SPARK-1132] Persisting Web UI through r...
Date Tue, 04 Mar 2014 20:17:46 GMT
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/42#discussion_r10272629
  
    --- 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 --
    
    I'm just saying it would be better to keep this ugliness internal and have the public
constructor take an `Option[SparkContext]`. Then you could have something like this:
    
    ```
    val live = sc.isDefined
    // Only valid if live
    def _sc = sc.get
    ```
    
    Would that work?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message