Github user vanzin commented on the pull request:

    https://github.com/apache/spark/pull/7657#issuecomment-125403153
  
    > whether spark.executor.instances is always set if you set --num-executors
    
    It depends on whether it's client or cluster mode. In client mode, this is 
used:
    
          OptionAssigner(args.numExecutors, YARN, CLIENT, sysProp = 
"spark.executor.instances"),
    
    So the command line arg is turned into a sys prop. In cluster mode, this is 
used:
    
          OptionAssigner(args.numExecutors, YARN, CLUSTER, clOption = 
"--num-executors"),
    
    So the handling is now in YARN's `ClientArguments.scala`. That can get 
tricky to follow in the code.
    
    @neurons I suggest getting rid of "--num-executors" in `ClientArguments`, 
and instead using `spark.executor.instances` everywhere, leaving the 
translation solely in SparkSubmit (the first line I mention above). That should 
also allow some code in `ApplicationMaster` and `ApplicationMasterArguments` to 
be cleaned up.


---
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]

Reply via email to