Skip to content
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

Closed
wants to merge 8 commits into from

Conversation

tgravescs
Copy link
Contributor

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

@tgravescs
Copy link
Contributor Author

@jiangxb1987 @mengxr

@SparkQA
Copy link

SparkQA commented Jun 7, 2019

Test build #106282 has finished for PR 24821 at commit 3298c0d.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 8, 2019

Test build #106283 has finished for PR 24821 at commit db953d9.

  • This patch fails from timeout after a configured wait of 400m.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member

Retest this please.

@SparkQA
Copy link

SparkQA commented Jun 8, 2019

Test build #106290 has finished for PR 24821 at commit db953d9.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tgravescs
Copy link
Contributor Author

looking at test failures to see if I can reproduce locally

@SparkQA
Copy link

SparkQA commented Jun 10, 2019

Test build #106351 has finished for PR 24821 at commit 4db01b0.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mengxr
Copy link
Contributor

mengxr commented Jun 11, 2019

making a pass

@mengxr
Copy link
Contributor

mengxr commented Jun 11, 2019

@tgravescs I will do some refactoring and send a PR to you.

@tgravescs
Copy link
Contributor Author

@mengxr please just put up a PR

@tgravescs tgravescs closed this Jun 12, 2019
@mengxr
Copy link
Contributor

mengxr commented Jun 12, 2019

will do

kiku-jw pushed a commit to kiku-jw/spark that referenced this pull request Jun 26, 2019
## 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants