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

    https://github.com/apache/spark/pull/7532#discussion_r35961262
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/master/ApplicationInfo.scala ---
    @@ -96,6 +101,14 @@ private[spark] class ApplicationInfo(
     
       private[master] def coresLeft: Int = requestedCores - coresGranted
     
    +  /**
    +   * Return whether this application should launch at most one executor 
per worker.
    +   *
    +   * This is true if cores per executor is not defined, in which case the 
executor should
    +   * grab all the available cores on the worker instead.
    +   */
    +  private[master] def oneExecutorPerWorker(): Boolean = 
desc.coresPerExecutor.isEmpty
    +
    --- End diff --
    
    Is it better of being declared as a local variable in 
scheduleExecutorsOnWorkers? The decision of translating 
coresPerExecutor.isEmpty to oneExecutorPerWorker seems to belong to the 
scheduler, in case we decide to change default behavior in the future.


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