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

 ##########
 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:
   yes

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

Reply via email to