-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-27823][CORE] Add an abstraction layer for resource handling #24821
Conversation
Test build #106282 has finished for PR 24821 at commit
|
Test build #106283 has finished for PR 24821 at commit
|
Retest this please. |
Test build #106290 has finished for PR 24821 at commit
|
looking at test failures to see if I can reproduce locally |
Test build #106351 has finished for PR 24821 at commit
|
making a pass |
@tgravescs I will do some refactoring and send a PR to you. |
@mengxr please just put up a PR |
will do |
## What changes were proposed in this pull request? Continue the work from apache#24821. Refactor resource handling code to make the code more readable. Major changes: * Moved resource-related classes to `spark.resource` from `spark`. * Added ResourceUtils and helper classes so we don't need to directly deal with Spark conf. * ResourceID: resource identifier and it provides conf keys * ResourceRequest/Allocation: abstraction for requested and allocated resources * Added `TestResourceIDs` to reference commonly used resource IDs in tests like `spark.executor.resource.gpu`. cc: tgravescs jiangxb1987 Ngone51 ## How was this patch tested? Unit tests for added utils and existing unit tests. Closes apache#24856 from mengxr/SPARK-27823. Lead-authored-by: Xiangrui Meng <[email protected]> Co-authored-by: Thomas Graves <[email protected]> Signed-off-by: Xingbo Jiang <[email protected]>
What changes were proposed in this pull request?
Add an abstraction layer for the Resource layer stuff to make it more readable.
I think the only actual behavioral change here is that now you can specify both a resourceFileOpt and the discovery script for different resources and it will join them together. Previously it only allowed one or the other option to be used. I did also add in one more warning for the user when the resource configurations will waste resources.
How was this patch tested?
Unit tests and ran on local cluster, yarn