tgravescs opened a new pull request #34485:
URL: https://github.com/apache/spark/pull/34485


   
   ### What changes were proposed in this pull request?
   Add configs to allow mapping the Spark gpu/fpga resource type to a custom 
YARN resource type. 
   Currently Spark hardcodes the mapping of resource "gpu" to "yarn.io/gpu" and 
"fpga" to "yarn.io/fpga". This PR just allows the user to specify the 
"yarn.io/*" resource side. 
   
   Note it would be nice to put this in 3.2.1 as well, let me know if any 
objections.
   
   ### Why are the changes needed?
   YARN supports custom resource types and in Hadoop 3.3.1 made it easier for 
users to plugin in custom resource types. This means users may create a custom 
resource type that represents a GPU or FPGAs because they want additional logic 
that the YARN built in versions don't have.  Ideally Spark users still just  
use the generic "gpu" or "fpga" types in Spark.  So this adds that ability so 
Spark end users don't need to know about changes to YARN resource types.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as 
the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes 
- provide the console output, description and/or an example to show the 
behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to 
the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   Configs added.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some 
test cases that check the changes thoroughly including negative and positive 
cases if possible.
   If it was tested in a way different from regular unit tests, please clarify 
how you tested step by step, ideally copy and paste-able, so that other 
reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why 
it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions 
for the consistent environment, and the instructions could accord to: 
https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   Tested manually with Hadoop 3.3.1 plugin 
https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/DevelopYourOwnDevicePlugin.html
   and unit tests added here.


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