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

    https://github.com/apache/spark/pull/7532#discussion_r35032974
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala 
---
    @@ -762,6 +789,86 @@ private[master] class Master(
       }
     
       /**
    +   * Handle a request from an application to set the executors limit for 
this application.
    +   * @return whether the application has previously registered with this 
Master.
    +   */
    +  private def handleRequestExecutors(appId: String, requestedTotal: Int): 
Boolean = {
    +    idToApp.get(appId) match {
    +      case Some(appInfo) =>
    +        logInfo(s"Application $appId requested to set total executors to 
$requestedTotal.")
    +        appInfo.executorLimit = requestedTotal
    +
    +        // We may have previously added workers to the blacklist. Now that 
the application
    +        // explicitly requests more executors, we can fulfill the request 
by removing workers
    +        // from the blacklist, if any.
    +        if (appInfo.desc.coresPerExecutor.isEmpty) {
    +          val numMissingExecutors = appInfo.executorLimit - 
appInfo.executors.size
    +          if (numMissingExecutors > 0) {
    +            appInfo.blacklistedWorkers.take(numMissingExecutors).foreach { 
workerId =>
    --- End diff --
    
    I see, so blacklist is just for filtering the workers in the next 
scheduling rounds until we do request more resources. I thought its semantics 
is related to "unlike this worker"
    
    Everything is clear now! Thanks!


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