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/05/29 19:25:43 UTC

[GitHub] [spark] erikerlandson commented on a change in pull request #24703: [SPARK-27362][K8S] Resource Scheduling support for k8s

erikerlandson commented on a change in pull request #24703: [SPARK-27362][K8S]  Resource Scheduling support for k8s
URL: https://github.com/apache/spark/pull/24703#discussion_r288730857
 
 

 ##########
 File path: resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesUtils.scala
 ##########
 @@ -216,6 +217,32 @@ private[spark] object KubernetesUtils extends Logging {
     Hex.encodeHexString(random) + time
   }
 
+  /**
+   * This function builds the Quantity objects for each resource in the Spark resource
+   * configs based on the component name(spark.driver.resource or spark.executor.resource).
+   * It assumes we can use the Kubernetes device plugin format: vendor-domain/resource.
+   * It returns a set with a tuple of vendor-domain/resource and Quantity for each resource.
+   */
+  def buildResourcesQuantities(
+      componentName: String,
+      sparkConf: SparkConf): Set[(String, Quantity)] = {
+    val allResources = sparkConf.getAllWithPrefix(componentName)
 
 Review comment:
   is this corresponding to `spark.{driver,executor}.resources...`

----------------------------------------------------------------
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