spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JonathanTaws <>
Subject [GitHub] spark pull request #15405: [SPARK-15917][CORE] Added support for number of e...
Date Mon, 10 Oct 2016 20:08:13 GMT
Github user JonathanTaws commented on a diff in the pull request:
    --- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala ---
    @@ -637,6 +637,16 @@ private[deploy] class Master(
           freeWorkers = freeWorkers.filter(canLaunchExecutor)
    +    val numExecutorsScheduled = assignedExecutors.sum
    +    val numExecutorsLaunched = app.executors.size
    +    // Check to see if we managed to launch the requested number of executors
    +    if(numUsable != 0 && numExecutorsLaunched != app.executorLimit &&
    +      numExecutorsScheduled != app.executorLimit) {
    --- End diff --
    `numExecutorsLaunched` corresponds to the actual number of executors that have been launched
so far (literally that have been registered in the executors list in the ApplicationInfo),
whereas  `numExecutorsScheduled` corresponds to the number of executors that have been scheduled/allocated
by `scheduleExecutorsOnWorkers`. This is needed because `scheduleExecutorsOnWorkers` is called
multiple times when setting up the executors, and if we don't check the condition we will
log repeatedly the same message but with incorrect information (such as "0 executors launched"
even though the executors have been launched previously). 
    Tell me if that doesn't make sense, I did a lot of trial and error until coming up with
this condition. 

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message