attilapiros commented on a change in pull request #24989: [SPARK-27959][YARN]
Change YARN resource configs to use .amount
URL: https://github.com/apache/spark/pull/24989#discussion_r304030057
##########
File path:
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ResourceRequestHelper.scala
##########
@@ -40,6 +40,45 @@ import org.apache.spark.util.{CausedBy, Utils}
private object ResourceRequestHelper extends Logging {
private val AMOUNT_AND_UNIT_REGEX = "([0-9]+)([A-Za-z]*)".r
private val RESOURCE_INFO_CLASS =
"org.apache.hadoop.yarn.api.records.ResourceInformation"
+ val YARN_GPU_RESOURCE_CONFIG = "yarn.io/gpu"
+ val YARN_FPGA_RESOURCE_CONFIG = "yarn.io/fpga"
+
+ private[yarn] def getYarnResourcesAndAmounts(
+ sparkConf: SparkConf,
+ componentName: String): Map[String, String] = {
Review comment:
Nit: in `getYarnResourcesFromSparkResources` the second parameter is the
SparkConf what about taking the componentName (prefix) to the first place here
too.
----------------------------------------------------------------
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]