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

    https://github.com/apache/spark/pull/2432#discussion_r18381532
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -187,6 +187,15 @@ class SparkContext(config: SparkConf) extends Logging {
       val master = conf.get("spark.master")
       val appName = conf.get("spark.app.name")
     
    +  val isEventLogEnabled = conf.getBoolean("spark.eventLog.enabled", false)
    +  val eventLogDir: Option[String] = {
    +    if (isEventLogEnabled) {
    +      Some(conf.get("spark.eventLog.dir", 
EventLoggingListener.DEFAULT_LOG_DIR).stripSuffix("/"))
    +    } else {
    +      None
    +    }
    +  }
    +
    --- End diff --
    
    I think, those are needed because SparkDeploySchedulerBackend references 
sc.eventLogDir.
    We cannot do that pass the eventLogDir to only EventLoggingListener and 
SparkDeploySchedulerBackend refers the eventLogDir via EventLoggingListener 
because EventLoggingListener should be instantiated after creating task 
scheduler. Task scheduler cannot refer.
    
    SparkDeploySchedulerBackend and EventLoggingListener can get eventLogDir by 
conf.get themselves. But, if we take such approach, EventLoggingListener should 
check whether event logging is enabled before getting eventLogDir even though 
the check is done in SparkContext.


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