tgravescs commented on a change in pull request #26078: [SPARK-29151][CORE] Support fractional resources for task resource scheduling URL: https://github.com/apache/spark/pull/26078#discussion_r333581119
########## File path: core/src/main/scala/org/apache/spark/SparkContext.scala ########## @@ -2775,7 +2775,10 @@ object SparkContext extends Logging { s" = ${taskReq.amount}") } // Compare and update the max slots each executor can provide. - val resourceNumSlots = execAmount / taskReq.amount + // If the configured amount per task was < 1.0, a task is subdividing + // executor resources. If the amount per task was > 1.0, the task wants + // multiple executor resources. + val resourceNumSlots = Math.floor(execAmount * taskReq.numParts/taskReq.amount).toInt Review comment: add spaces around the "/" ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org