Github user jerryshao commented on the pull request:
https://github.com/apache/spark/pull/9523#issuecomment-154689758
Looking at the code again, looks like there's already some codes take care
of this backward compatibility in yarn
[client](https://github.com/apache/spark/blob/master/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala#L1049).
The problem is that it is not worked because `ClientArguments` is already
initialized before this setting.
So simply we could fix this by moving this part of code into
[here](https://github.com/apache/spark/blob/master/yarn/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala#L183).
```scala
// to maintain backwards-compatibility
if (!Utils.isDynamicAllocationEnabled(sparkConf)) {
sparkConf.set("spark.executor.instances", args.numExecutors.toString)
}
```
That is more consistent with SparkSubmit, also cmd line args can override
configuration `spark.executor.instances` if both set.
What do you think?
---
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]