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

    https://github.com/apache/spark/pull/22849#discussion_r229198651
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
 ---
    @@ -240,7 +240,7 @@ class CoarseGrainedSchedulerBackend(scheduler: 
TaskSchedulerImpl, val rpcEnv: Rp
           val taskDescs = CoarseGrainedSchedulerBackend.this.synchronized {
             // Filter out executors under killing
             val activeExecutors = executorDataMap.filterKeys(executorIsAlive)
    -        val workOffers = activeExecutors.map {
    +        val workOffers = activeExecutors.filter(_._2.freeCores > 0).map {
    --- End diff --
    
    I checked the git log, at the beginning function `makeOffers` do not filter 
out any resource, maybe it is the reason why the comment is "Make fake resource 
offers on all executors"
     `// Make fake resource offers on all executors
        def makeOffers() {
          launchTasks(scheduler.resourceOffers(
            executorHost.toArray.map {case (id, host) => new WorkerOffer(id, 
host, freeCores(id))}))
        }`



---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to