Github user dhruve commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14269#discussion_r118573078
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/LiveListenerBus.scala ---
    @@ -32,18 +33,24 @@ import org.apache.spark.util.Utils
      * has started will events be actually propagated to all attached 
listeners. This listener bus
      * is stopped when `stop()` is called, and it will drop further events 
after stopping.
      */
    -private[spark] class LiveListenerBus extends SparkListenerBus {
    +private[spark] class LiveListenerBus(val sparkContext: SparkContext) 
extends SparkListenerBus {
    --- End diff --
    
    From what I recall and as you mentioned, a ref to ```sparkContext``` was 
already being used to tear down when the listener died because of an uncaught 
Exception. The idea was to refactor the code to make `sparkContext` available 
at instantiation time and access the conf from it rather than passing it 
separately. This defn is cyclic and ```lazy val```  was used to ensure that 
conf was accessed only after sc was intialized.


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to