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_r375061419
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
 ##########
 @@ -469,8 +486,10 @@ private[spark] class TaskSetManager(
           extraResources,
           serializedTask)
       }
+      (taskDescription,
+        taskDescription.isEmpty && maxLocality == TaskLocality.ANY && 
pendingTasks.all.nonEmpty)
 
 Review comment:
   👍 
   What are your thoughts on:
   I'm thinking instead of making assumptions about what 
`taskDescription.isEmpty` means, maybe it'd be better to pass maxLocality into 
`dequeueTask` and then change its logic near the bottom to be something like:
   
   ```
       if (TaskLocality.isAllowed(allowedLocality, TaskLocality.ANY)) {
         dequeue(pendingTaskSetToUse.all).foreach { index =>
           return Some((index, TaskLocality.ANY, speculative))
         }
       } else if (maxLocality == TaskLocality.ANY && pendingTasks.all.nonEmpty) 
{
         hasReject = true
       }
   ```

----------------------------------------------------------------
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]

Reply via email to