tgravescs commented on a change in pull request #27773: [SPARK-29154][CORE]
Update Spark scheduler for stage level scheduling
URL: https://github.com/apache/spark/pull/27773#discussion_r389794784
##########
File path:
core/src/main/scala/org/apache/spark/scheduler/local/LocalSchedulerBackend.scala
##########
@@ -162,7 +162,13 @@ private[spark] class LocalSchedulerBackend(
override def applicationId(): String = appId
- override def maxNumConcurrentTasks(): Int = totalCores /
scheduler.CPUS_PER_TASK
+ // Doesn't support different ResourceProfiles yet
+ // so we expect all executors to be of same ResourceProfile
+ override def maxNumConcurrentTasks(rp: ResourceProfile): Int = {
+ val cpusPerTask = rp.taskResources.get(ResourceProfile.CPUS)
+ .map(_.amount.toInt).getOrElse(scheduler.CPUS_PER_TASK)
+ totalCores / cpusPerTask
Review comment:
not currently planned but someone did just say they were going to add the
generic resource scheduling work in local mode. I think for testing purposes
so they can keep production code same. did you have specific use case or
concern?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]