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

    https://github.com/apache/spark/pull/7657#discussion_r35680277
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -528,7 +528,8 @@ class SparkContext(config: SparkConf) extends Logging 
with ExecutorAllocationCli
           }
     
         // Optionally scale number of executors dynamically based on workload. 
Exposed for testing.
    -    val dynamicAllocationEnabled = 
_conf.getBoolean("spark.dynamicAllocation.enabled", false)
    +    val dynamicAllocationEnabled = 
_conf.getBoolean("spark.dynamicAllocation.enabled", false) &&
    +      (_conf.getInt("spark.executor.instances", 0) == 0)
    --- End diff --
    
    yes, +1 to @srowen's comment. We also need to add a comment here to explain 
why it's not enabled if we set `spark.executor.instances`, something like
    
    ```
    // Dynamic allocation and explicitly setting the number of executors are 
inherently
    // incompatible. In environments where dynamic allocation is turned on by 
default,
    // the latter should override the former (SPARK-9092).
    ```


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