You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/07/16 18:24:16 UTC

[GitHub] [spark] attilapiros commented on a change in pull request #24989: [SPARK-27959][YARN] Change YARN resource configs to use .amount

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_r304016852
 
 

 ##########
 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"
 
 Review comment:
   Does it make sense to reuse `ResourceUtils.GPU` and `ResourceUtils.FPGA` here? 
   
   Like:
   
   ```scala
     val YARN_GPU_RESOURCE_CONFIG = "yarn.io/$GPU"
     val YARN_FPGA_RESOURCE_CONFIG = "yarn.io/$FPGA"
   ```
   
   For suggesting using as close mapping as possible between the Spark config keys and YARN resource config keys (now and the future).
   
   I know your PR does not touched this part:
   https://github.com/apache/spark/blob/6e86ab9b9db12a88998e54d6358d3ac6143e957a/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ResourceRequestHelper.scala#L111-L118
   
   But at that place using the right constant (`$GPU` or `$FPGA`) instead of the string literal is reasonable.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org