Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/5551#discussion_r28577520
--- Diff:
yarn/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala ---
@@ -103,9 +103,14 @@ private[spark] class ClientArguments(args:
Array[String], sparkConf: SparkConf)
* This is intended to be called only after the provided arguments have
been parsed.
*/
private def validateArgs(): Unit = {
- if (numExecutors <= 0) {
+ if (numExecutors < 0 || (!isDynamicAllocationEnabled && numExecutors
== 0)) {
throw new IllegalArgumentException(
- "You must specify at least 1 executor!\n" + getUsageMessage())
+ s"""
+ |Number of executors $numExecutors is not legal.
+ |If dynamic allocation is enable, number of executors should at
least be 0.
--- End diff --
enabled -> enabled. I think this is simpler to state as "Number of
executors was $numExecutors, but must be at least 1 (or 0 if dynamic executor
allocation is enabled)."
---
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]