Github user bOOm-X commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18253#discussion_r130345159
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -2379,8 +2382,13 @@ class SparkContext(config: SparkConf) extends 
Logging {
                     " parameter from breaking Spark's ability to find a valid 
constructor.")
               }
             }
    -        listenerBus.addListener(listener)
    -        logInfo(s"Registered listener $className")
    +        logInfo(s"listener $className created")
    +        listener
    +      }
    +      if (extraListeners.nonEmpty) {
    +        val group = new FixGroupOfListener(extraListeners, 
"extraListeners")
    --- End diff --
    
    First, I think that modifying the existing addListener method is a bad 
idea. It will impact a lot the code.  We want to keep this method with its 
current behavior (add a listener to the "default" queue) and be able to add 
listener in other queue. I think that adding a String label and doing matching 
on it to determine the queue is quite error prone. I prefer having a more 
constrained API. 
    For the FixedGroupOfListener name, I can change it. But I have 2 kind of 
group of listeners:
     - `FixGroupOfListener` : For group of inter-dependant listeners (like UI 
listeners). I can rename it to `ListenerImmutableGroup`
     - `ModifiableGroupOfListener` : For the "default" queue. I can rename it 
to `ListenerGroup`
    
    Are these name OK for you ? 


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