tgravescs commented on a change in pull request #27126: [SPARK-30417][CORE] 
Task speculation numTaskThreshold should be greater than 0 even if the 
configuration is not set correctly
URL: https://github.com/apache/spark/pull/27126#discussion_r364238666
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
 ##########
 @@ -87,7 +87,13 @@ private[spark] class TaskSetManager(
   // number of slots on a single executor, would the task manager speculative 
run the tasks if
   // their duration is longer than the given threshold. In this way, we 
wouldn't speculate too
   // aggressively but still handle basic cases.
-  val speculationTasksLessEqToSlots = numTasks <= (conf.get(EXECUTOR_CORES) / 
sched.CPUS_PER_TASK)
+  // SPARK-30417: #cores per executor might not be set in spark conf for 
standalone mode, then
+  // the value of the conf would 1 by default. However, the executor would use 
all the cores on
+  // the worker. Therefore, CPUS_PER_TASK is okay to be greater than 1 without 
setting #cores.
+  // To handle this case, we assume the minimum number of slots is 1.
 
 Review comment:
   I'm fixing that issue with https://issues.apache.org/jira/browse/SPARK-30446

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