tgravescs commented on a change in pull request #27207:
[WIP][SPARK-18886][CORE] Make Locality wait time measure resource under
utilization due to delay scheduling.
URL: https://github.com/apache/spark/pull/27207#discussion_r366921621
##########
File path:
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala
##########
@@ -454,18 +484,32 @@ private[spark] class TaskSchedulerImpl(
s"number of available slots is $availableSlots.")
} else {
var launchedAnyTask = false
+ var hadAnyDelaySchedulingReject = false
+ var globalMinLocality: Option[TaskLocality] = None
// Record all the executor IDs assigned barrier tasks on.
val addressesWithDescs = ArrayBuffer[(String, TaskDescription)]()
for (currentMaxLocality <- taskSet.myLocalityLevels) {
var launchedTaskAtCurrentMaxLocality = false
do {
- launchedTaskAtCurrentMaxLocality =
resourceOfferSingleTaskSet(taskSet,
- currentMaxLocality, shuffledOffers, availableCpus,
+ val (launched, hadDelayScheduleReject, minLocality) =
resourceOfferSingleTaskSet(
+ taskSet, currentMaxLocality, shuffledOffers, availableCpus,
availableResources, tasks, addressesWithDescs)
+ launchedTaskAtCurrentMaxLocality = launched
launchedAnyTask |= launchedTaskAtCurrentMaxLocality
+ hadAnyDelaySchedulingReject |= hadDelayScheduleReject
+ globalMinLocality = minTaskLocality(globalMinLocality, minLocality)
} while (launchedTaskAtCurrentMaxLocality)
}
+ if (!hadAnyDelaySchedulingReject) {
Review comment:
nit - I think the variable names are a bit confusing because you have
noDelay and then hadAnyDelay, I think it would be easier to read if they were
the same.
----------------------------------------------------------------
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]