Github user jiangxb1987 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18711#discussion_r128945886
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala 
---
    @@ -580,7 +580,8 @@ private[deploy] class Master(
        * The number of cores assigned to each executor is configurable. When 
this is explicitly set,
        * multiple executors from the same application may be launched on the 
same worker if the worker
        * has enough cores and memory. Otherwise, each executor grabs all the 
cores available on the
    -   * worker by default, in which case only one executor may be launched on 
each worker.
    +   * worker by default, in which case only one executor may be launched on 
each worker only one
    +   * schedules.
    --- End diff --
    
    Should also add:
    ```
    Note that when `spark.executor.cores` is not set, we may still launch 
multiple executors from the same application on the same worker. Consider appA 
and appB both have one executor running on worker1, and appA.coresLeft > 0, 
then appB is finished and release all its cores on worker1, thus for the next 
schedule iteration, appA launchs a new executor that grabs all the free cores 
on worker1, therefore we get mulfiple executors from appA running on worker1.
    ```


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