jiangxb1987 commented on a change in pull request #27138: [SPARK-30448][Core]
accelerator aware scheduling enforce cores as limiting resource
URL: https://github.com/apache/spark/pull/27138#discussion_r364438059
##########
File path: core/src/main/scala/org/apache/spark/SparkContext.scala
##########
@@ -2818,12 +2825,28 @@ object SparkContext extends Logging {
// multiple executor resources.
val resourceNumSlots = Math.floor(execAmount * taskReq.numParts /
taskReq.amount).toInt
if (resourceNumSlots < numSlots) {
+ if (shouldCheckExecCores) {
+ throw new IllegalArgumentException("The number of slots on an
executor has to be " +
Review comment:
only throw this exception when dynamic allocation is enabled?
----------------------------------------------------------------
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]