Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/10914#discussion_r51656829
--- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
@@ -531,13 +531,14 @@ class SparkContext(config: SparkConf) extends Logging
with ExecutorAllocationCli
}
// Optionally scale number of executors dynamically based on workload.
Exposed for testing.
- val dynamicAllocationEnabled = Utils.isDynamicAllocationEnabled(_conf)
- if (!dynamicAllocationEnabled &&
_conf.getBoolean("spark.dynamicAllocation.enabled", false)) {
+ val dynamicAllocationEnabled = Utils.isDynamicAllocationEnabled(_conf,
isLocal)
+ if (_conf.getInt("spark.executor.instances", 0) != 0
+ && _conf.getBoolean("spark.dynamicAllocation.enabled", false)) {
logWarning("Dynamic Allocation and num executors both set, thus
dynamic allocation disabled.")
}
_executorAllocationManager =
- if (dynamicAllocationEnabled) {
+ if (dynamicAllocationEnabled ||
_conf.getBoolean("spark.dynamicAllocation.testing", false)) {
--- End diff --
why change this here? The whole point of the util method is that we don't
need to do something like this. I would move the check for
`spark.dynamicAllocation.testing` into the Utils method as well
---
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]