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

    https://github.com/apache/spark/pull/4111#discussion_r23337589
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -379,6 +379,41 @@ class SparkContext(config: SparkConf) extends Logging 
with ExecutorAllocationCli
         }
       executorAllocationManager.foreach(_.start())
     
    +  // Use reflection to instantiate listeners specified via the 
`spark.extraListeners` configuration
    +  // or the SPARK_EXTRA_LISTENERS environment variable
    +  try {
    +    val listenerClassNames: Seq[String] = {
    +      val fromSparkConf = conf.get("spark.extraListeners", "").split(',')
    +      val fromEnvVar = 
Option(conf.getenv("SPARK_EXTRA_LISTENERS")).getOrElse("").split(',')
    --- End diff --
    
    This functions slightly differently than the rest of our env-based 
configurations: the settings from this configuration are merged with the 
SparkConf configuration, rather than overriding/being-overriden by it.  My 
motivation for this configuration was to provide a mechanism for the execution 
environment to inject custom listeners without having to worry about them being 
overriden by settings in the user's SparkConf (this is necessary because we 
don't have a mechanism for automatic merging of Spark configurations).


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