bmarcott 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_r375058640
##########
File path:
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala
##########
@@ -454,18 +484,34 @@ private[spark] class TaskSchedulerImpl(
s"number of available slots is $availableSlots.")
} else {
var launchedAnyTask = false
+ var noDelaySchedulingRejects = true
+ 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, noDelayScheduleReject, minLocality) =
resourceOfferSingleTaskSet(
+ taskSet, currentMaxLocality, shuffledOffers, availableCpus,
availableResources, tasks, addressesWithDescs)
+ launchedTaskAtCurrentMaxLocality = launched
launchedAnyTask |= launchedTaskAtCurrentMaxLocality
+ noDelaySchedulingRejects &= noDelayScheduleReject
+ globalMinLocality = minTaskLocality(globalMinLocality, minLocality)
} while (launchedTaskAtCurrentMaxLocality)
}
+ if (!legacyLocalityWaitReset) {
Review comment:
where do you suggest the documentation go? in the doc of
`spark.locality.wait` configuration inside package.scala?
----------------------------------------------------------------
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]