Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/7657#discussion_r35480770
--- 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 --
I think this is better as `! ... _conf.contains(...)`? Although I don't
think 0 executors is allowed, this logic would not work if it were.
The docs in `running-on-yarn.md` need to update to explain the new behavior
a little.
---
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]