spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewor14 <...@git.apache.org>
Subject [GitHub] spark pull request: SPARK-1706: Allow multiple executors per worke...
Date Wed, 25 Mar 2015 02:03:44 GMT
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/731#discussion_r27090207
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala ---
    @@ -513,89 +513,122 @@ private[spark] class Master(
       }
     
       /**
    -   * Can an app use the given worker? True if the worker has enough memory and we haven't
already
    -   * launched an executor for the app on it (right now the standalone backend doesn't
like having
    -   * two executors on the same worker).
    +   * Can an app use the given worker?
        */
    -  def canUse(app: ApplicationInfo, worker: WorkerInfo): Boolean = {
    -    worker.memoryFree >= app.desc.memoryPerSlave && !worker.hasExecutor(app)
    +  private def canUse(app: ApplicationInfo, worker: WorkerInfo): Boolean = {
    +    val enoughResources = worker.memoryFree >= app.desc.memoryPerExecutorMB &&
worker.coresFree > 0
    +    val allowToExecute = app.desc.maxCorePerExecutor.isDefined || !worker.hasExecutor(app)
    +    allowToExecute && enoughResources
    --- End diff --
    
    I'm not sure if we need `allowToExecute` here. If `maxCorePerExecutor` is not defined
then we will grab all the cores, in which case `worker.coresFree` will be 0.


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

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


Mime
View raw message