srowen commented on a change in pull request #24261: [SPARK-27192][Core] 
spark.task.cpus should be less or equal than spark.executor.cores
URL: https://github.com/apache/spark/pull/24261#discussion_r270884610
 
 

 ##########
 File path: 
core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala
 ##########
 @@ -155,7 +159,9 @@ class TaskSchedulerImplSuite extends SparkFunSuite with 
LocalSparkContext with B
 
   test("Scheduler correctly accounts for multiple CPUs per task") {
     val taskCpus = 2
-    val taskScheduler = setupScheduler(config.CPUS_PER_TASK.key -> 
taskCpus.toString)
+    val taskScheduler = setupSchedulerWithMaster(
+      "local[2]",  // for passing CPUS_PER_TASK check in SparkContext
 
 Review comment:
   I don't know if that comment is necessary, and I suppose you could write 
`s"local[$taskCpus]"` here. But seems OK with me overall.

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