Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/7657#discussion_r36688007
--- Diff:
yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala ---
@@ -86,7 +86,7 @@ private[yarn] class YarnAllocator(
private var executorIdCounter = 0
@volatile private var numExecutorsFailed = 0
- @volatile private var targetNumExecutors = args.numExecutors
+ @volatile private var targetNumExecutors =
YarnSparkHadoopUtil.DEFAULT_NUMBER_EXECUTORS
--- End diff --
Seems like you missed my previous comment so I'll just paste it here, since
github makes it hard to find otherwise:
Actually, this code is not right after your changes. The value of
spark.executor.instances, previously, was either the value set by the user (if
dynamic allocation is disabled), or the value of
spark.dynamicAllocation.initialExecutors if dynamic allocation is enabled (see
ClientArguments.loadEnvironmentArgs).
So, instead, it should check both cases. Something like:
@volatile private var targetNumExecutors =
if (Utils.isDynamicAllocationEnabled(sparkConf)) {
sparkConf.getInt("spark.dynamicAllocation.initialExecutors", 0)
} else {
sparkConf.getInt("spark.executor.instances",
YarnSparkHadoopUtil.DEFAULT_NUMBER_EXECUTORS)
}
The way these options are propagate is still a little confusing (and the
lack of tests doesn't help), so I hope that's enough. There might be some other
cleanup possible, but I'm not gonna ask you to go there.
---
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]