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-37145][K8S] Add KubernetesCustom[Driver/Executor]FeatureConfigStep developer api #35345

Closed
wants to merge 8 commits into from

Conversation

Yikun
Copy link
Member

@Yikun Yikun commented Jan 28, 2022

What changes were proposed in this pull request?

This patch adds the support for extending user feature steps with configuration by adding 2 developer api:

  • KubernetesDriverCustomFeatureConfigStep: to help user extend custom feature step in executor side
  • KubernetesExecutorCustomFeatureConfigStep: to help user extend custom feature step in driver side

Before this patch user can only add feature step like:

  • class TestStep extends KubernetesFeatureConfigStep: without any kubernetes conf

After this patch user can add feature step with configuration like:

  • class TestStepWithDriverConf extends KubernetesDriverCustomFeatureConfigStep: only driver
  • class TestStepWithExecConf extends KubernetesExecutorCustomFeatureConfigStep: only executor
  • class TestStepWithK8SConf extends KubernetesDriverCustomFeatureConfigStep with KubernetesExecutorCustomFeatureConfigStep: both driver and executor

Why are the changes needed?

In #30206 , a developer API for custom feature steps has been added, but it didn't support initialize user feature step with kubernetes conf (like KubernetesConf/KubernetesDriverConf/KubernetesExecutorConf).

In most of scenarios, users want to make corresponding changes in their feature steps according to the configuration. Such as, the customized scheduler scenario, user wants to configure pod according to passed job configuration.

Does this PR introduce any user-facing change?

Improve the developer API for for custom feature steps.

How was this patch tested?

  • Added UT
  • Runing k8s integration test manaully: build/sbt -Pkubernetes -Pkubernetes-integration-tests -Dtest.exclude.tags=minikube,r "kubernetes-integration-tests/test

Closes: #34924

@Yikun Yikun changed the title [SPARK-37145][K8S] (Alternative) Add support for extending user feature steps with configuration [SPARK-37145][K8S] Add KubernetesCustomFeatureConfigStep DeveloperApi Jan 28, 2022
@Yikun Yikun changed the title [SPARK-37145][K8S] Add KubernetesCustomFeatureConfigStep DeveloperApi [SPARK-37145][K8S] Add KubernetesCustomFeatureConfigStep developer api Jan 28, 2022
@Yikun Yikun marked this pull request as ready for review January 30, 2022 09:22
@Yikun
Copy link
Member Author

Yikun commented Feb 1, 2022

@attilapiros Thanks for your review, I will address soon.

(later)

updated.

@github-actions github-actions bot added the DOCS label Feb 1, 2022
@Yikun Yikun force-pushed the SPARK-37145-alt branch 4 times, most recently from 551a9a2 to d05b3d2 Compare February 1, 2022 09:46
@Yikun Yikun changed the title [SPARK-37145][K8S] Add KubernetesCustomFeatureConfigStep developer api [SPARK-37145][K8S] Add KubernetesCustom[Driver|Executor]FeatureConfigStep developer api Feb 1, 2022
@Yikun Yikun changed the title [SPARK-37145][K8S] Add KubernetesCustom[Driver|Executor]FeatureConfigStep developer api [SPARK-37145][K8S] Add KubernetesCustom[Driver/Executor]FeatureConfigStep developer api Feb 1, 2022
Copy link
Contributor

@attilapiros attilapiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bunch of Nits and a test refactor.

@Yikun
Copy link
Member Author

Yikun commented Feb 2, 2022

@attilapiros Thanks for your suggestion, it makes doc and test more clear and simple. Addressed.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making this improvement, @Yikun .
I made a few comments.

@Yikun
Copy link
Member Author

Yikun commented Feb 2, 2022

@dongjoon-hyun Thanks for your review, addressed. : )

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @Yikun and all.
Merged to master for Apache Spark 3.3.

@Yikun
Copy link
Member Author

Yikun commented Feb 3, 2022

@dongjoon-hyun @attilapiros Thanks for your help!

@dongjoon-hyun
Copy link
Member

Did I miss something from your comments, @attilapiros ?

@attilapiros
Copy link
Contributor

@dongjoon-hyun It is fine, I just planned to do another review round (the last one) and I got surprised it is already in.

@dongjoon-hyun
Copy link
Member

You can make comments still and we can handle it as follow-up PRs. Please let us know if you have any concern, @attilapiros .

dongjoon-hyun pushed a commit that referenced this pull request Feb 16, 2022
…ecutor]FeatureConfigStep`

### What changes were proposed in this pull request?
Add note for developers to show how to use `KubernetesDriverCustomFeatureConfigStep` and `KubernetesExecutorCustomFeatureConfigStep` (#35345).

### Why are the changes needed?
Give an example to show how to use it.

### Does this PR introduce _any_ user-facing change?
No, doc only

### How was this patch tested?
ci passed

Closes #35496 from Yikun/SPARK-37145-followup.

Authored-by: Yikun Jiang <yikunkero@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants