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

    https://github.com/apache/spark/pull/3696#discussion_r22237217
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnable.scala ---
    @@ -50,11 +51,12 @@ class ExecutorRunnable(
         executorCores: Int,
         appId: String,
         securityMgr: SecurityManager)
    -  extends Runnable with ExecutorRunnableUtil with Logging {
    +  extends Runnable with Logging {
    +
    +  lazy val env = prepareEnvironment
    --- End diff --
    
    In the old code, `prepareEnvironment` was called after `yarnConf` had been 
assigned:
    
    ```scala
    trait ExecutorRunnableUtil extends Logging {
     val yarnConf: YarnConfiguration
     val sparkConf: SparkConf
     lazy val env = prepareEnvironment
    ```
    
    Here, though, `env` appears before `yarnConf`.  I don't think that this is 
a problem here since `env` is a `lazy val`, but I wonder if we should move it 
as late in the `vals` section as possible so that its dependencies are declared 
before it can run.


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