Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/42#discussion_r10642658
--- Diff: core/src/main/scala/org/apache/spark/ui/SparkUI.scala ---
@@ -68,19 +101,33 @@ private[spark] class SparkUI(sc: SparkContext) extends
Logging {
/** Initialize all components of the server */
def start() {
- // NOTE: This is decoupled from bind() because of the following
dependency cycle:
- // DAGScheduler() requires that the port of this server is known
- // This server must register all handlers, including JobProgressUI,
before binding
- // JobProgressUI registers a listener with SparkContext, which
requires sc to initialize
+ storage.start()
jobs.start()
+ env.start()
exec.start()
+
+ // Storage status listener must receive events first, as other
listeners depend on its state
+ listenerBus.addListener(storageStatusListener)
+ listenerBus.addListener(storage.listener)
+ listenerBus.addListener(jobs.listener)
+ listenerBus.addListener(env.listener)
+ listenerBus.addListener(exec.listener)
+
+ // Log events only if this UI is live and the feature is enabled
+ if (live && conf.getBoolean("spark.eventLog.enabled", false)) {
--- End diff --
Would this be better to just move into `SparkContext`? Then you don't need
to have this live check. Also, the idea of enabling logging is really something
that is not specific to the SparkUI but might be used for other things as well.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---