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_r267197968
##########
File path: core/src/main/scala/org/apache/spark/SparkContext.scala
##########
@@ -2679,6 +2688,10 @@ object SparkContext extends Logging {
if (threadCount <= 0) {
throw new SparkException(s"Asked to run locally with $threadCount
threads")
}
+ if (cpusPerTask > threadCount) {
+ throw new SparkException(s"$threadCount threads available when run
local[$threads], " +
Review comment:
You already report threadCount in the message; local[threads] doesn't add
information. It can be removed
----------------------------------------------------------------
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]