mridulm commented on a change in pull request #34485:
URL: https://github.com/apache/spark/pull/34485#discussion_r743377519



##########
File path: docs/running-on-yarn.md
##########
@@ -205,6 +205,28 @@ To use a custom metrics.properties for the application 
master and executors, upd
   </td>
   <td>3.0.0</td>
 </tr>
+<tr>
+  <td><code>spark.yarn.resourceGpuDeviceName</code></td>
+  <td><code>yarn.io/gpu</code></td>
+  <td>
+    Specify the mapping of the Spark resource type of <code>gpu</code> to the 
YARN resource
+    representing a GPU. By default YARN uses <code>yarn.io/gpu</code> but if 
YARN has been
+    configured with a custom resource type, this allows remapping it.
+    Applies when using the <code>spark.{driver/executor}.resource.gpu.*</code> 
configs.
+  </td>
+  <td>3.2.1</td>
+</tr>
+<tr>
+  <td><code>spark.yarn.resourceFpgaDeviceName</code></td>
+  <td><code>yarn.io/fpga</code></td>
+  <td>
+    Specify the mapping of the Spark resource type of <code>fpga</code> to the 
YARN resource
+    representing a FPGA. By default YARN uses <code>yarn.io/fpga</code> but if 
YARN has been
+    configured with a custom resource type, this allows remapping it.
+    Applies when using the 
<code>spark.{driver/executor}.resource.fpga.*</code> configs.
+  </td>
+  <td>3.2.1</td>

Review comment:
       Is this targetting 3.2.1 ? Or master ?

##########
File path: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala
##########
@@ -281,7 +281,7 @@ private[yarn] class YarnAllocator(
       val resourcesWithDefaults =
         ResourceProfile.getResourcesForClusterManager(rp.id, 
rp.executorResources,
           MEMORY_OVERHEAD_FACTOR, sparkConf, isPythonApp,
-          ResourceRequestHelper.resourceNameMapping)
+          ResourceRequestHelper.getResourceNameMapping(sparkConf))

Review comment:
       nit: Given this should not change, do we want to make it a field and 
reference that here ?

##########
File path: docs/running-on-yarn.md
##########
@@ -205,6 +205,28 @@ To use a custom metrics.properties for the application 
master and executors, upd
   </td>
   <td>3.0.0</td>
 </tr>
+<tr>
+  <td><code>spark.yarn.resourceGpuDeviceName</code></td>
+  <td><code>yarn.io/gpu</code></td>
+  <td>
+    Specify the mapping of the Spark resource type of <code>gpu</code> to the 
YARN resource
+    representing a GPU. By default YARN uses <code>yarn.io/gpu</code> but if 
YARN has been
+    configured with a custom resource type, this allows remapping it.
+    Applies when using the <code>spark.{driver/executor}.resource.gpu.*</code> 
configs.
+  </td>
+  <td>3.2.1</td>
+</tr>
+<tr>
+  <td><code>spark.yarn.resourceFpgaDeviceName</code></td>
+  <td><code>yarn.io/fpga</code></td>
+  <td>
+    Specify the mapping of the Spark resource type of <code>fpga</code> to the 
YARN resource
+    representing a FPGA. By default YARN uses <code>yarn.io/fpga</code> but if 
YARN has been
+    configured with a custom resource type, this allows remapping it.
+    Applies when using the 
<code>spark.{driver/executor}.resource.fpga.*</code> configs.
+  </td>
+  <td>3.2.1</td>

Review comment:
       Given the scope of the change, and given it is backwardly compatible, I 
am fine with adding to 3.2.1 as well.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to