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

 ##########
 File path: core/src/test/scala/org/apache/spark/SparkContextSuite.scala
 ##########
 @@ -710,6 +710,24 @@ class SparkContextSuite extends SparkFunSuite with 
LocalSparkContext with Eventu
       assert(runningTaskIds.isEmpty)
     }
   }
+
+  Seq(
+    ("local", 2, None),
+    ("local[2]", 3, None),
+    ("local[2, 1]", 3, None),
+    ("spark://test-spark-cluster", 2, Option(1)),
+    ("local-cluster[1, 1, 1000]", 2, Option(1)),
+    ("yarn", 2, Option(1))
+  ).foreach {
+    case (master, cpusPerTask, executorCores) =>
+      test(s"Avoid setting ${CPUS_PER_TASK.key} unreasonably when run on 
$master (SPARK-27192)") {
 
 Review comment:
   Let's flip this around and have a test method that iterates over the 
possibilities

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