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

    https://github.com/apache/spark/pull/7274#discussion_r34854881
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala 
---
    @@ -544,58 +544,82 @@ private[master] class Master(
        * 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.
        */
    -  private def startExecutorsOnWorkers(): Unit = {
    -    // Right now this is a very simple FIFO scheduler. We keep trying to 
fit in the first app
    -    // in the queue, then the second app, etc.
    +
    +  private[master] def scheduleExecutorsOnWorkers(app: ApplicationInfo,
    +    usableWorkers: Array[WorkerInfo], spreadOutApps: Boolean): Array[Int] 
= {
    +    val coresPerExecutor = app.desc.coresPerExecutor.getOrElse(1)
    +    val memoryPerExecutor = app.desc.memoryPerExecutorMB
    +    val numUsable = usableWorkers.length
    +    val assignedCores = new Array[Int](numUsable) // Number of cores to 
give to each worker
    +    val assignedMemory = new Array[Int](numUsable) // Amount of memory to 
give to each worker
    +    var toAssign = math.min(app.coresLeft, 
usableWorkers.map(_.coresFree).sum)
    --- End diff --
    
    can you call this `coresToAssign`


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