Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21758#discussion_r203619822
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala ---
    @@ -346,6 +354,7 @@ private[spark] class TaskSchedulerImpl(
         // Build a list of tasks to assign to each worker.
         val tasks = shuffledOffers.map(o => new 
ArrayBuffer[TaskDescription](o.cores / CPUS_PER_TASK))
         val availableCpus = shuffledOffers.map(o => o.cores).toArray
    +    val availableSlots = shuffledOffers.map(o => o.cores / 
CPUS_PER_TASK).sum
    --- End diff --
    
    `availableCpus.sum / CPUS_PER_TAS`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to