squito commented on a change in pull request #24374: [SPARK-27366][CORE]
Support GPU Resources in Spark job scheduling
URL: https://github.com/apache/spark/pull/24374#discussion_r275602765
##########
File path: core/src/main/scala/org/apache/spark/internal/config/package.scala
##########
@@ -314,7 +352,23 @@ package object config {
private[spark] val IS_PYTHON_APP =
ConfigBuilder("spark.yarn.isPython").internal()
.booleanConf.createWithDefault(false)
- private[spark] val CPUS_PER_TASK =
ConfigBuilder("spark.task.cpus").intConf.createWithDefault(1)
+ private[spark] val CPUS_PER_TASK =
+ ConfigBuilder("spark.task.cpus")
+ .intConf
+ .checkValue(_ > 0, "Each task must require at least 1 cpu core.")
+ .createWithDefault(1)
+
+ // this is formatted this way to allow grabbing a bunch of sub pieces of the
config,
+ // for instance every type of resources, then for each resource various
configs like
+ // count, could add a type, etc.
Review comment:
I think I'm missing something, I dont' understand what this comment is
referring to
----------------------------------------------------------------
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]