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

    https://github.com/apache/spark/pull/19832#discussion_r205997728
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala 
---
    @@ -671,10 +671,23 @@ private[deploy] class Master(
           // If the cores left is less than the coresPerExecutor,the cores 
left will not be allocated
           if (app.coresLeft >= coresPerExecutor) {
             // Filter out workers that don't have enough resources to launch 
an executor
    -        val usableWorkers = workers.toArray.filter(_.state == 
WorkerState.ALIVE)
    +        var usableWorkers = workers.toArray.filter(_.state == 
WorkerState.ALIVE)
               .filter(worker => worker.memoryFree >= 
app.desc.memoryPerExecutorMB &&
                 worker.coresFree >= coresPerExecutor)
               .sortBy(_.coresFree).reverse
    +
    +        if (spreadOutApps) {
    +          def hasContainWorkersCount(worker: WorkerInfo): Int = {
    --- End diff --
    
    I will update it ,thanks 


---

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

Reply via email to