-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
Conversation
d658e71
to
e6cab27
Compare
e6cab27
to
ca0bc33
Compare
1bece1a
to
dd4db89
Compare
...s/core/src/main/scala/org/apache/spark/deploy/k8s/features/KubernetesFeatureConfigStep.scala
Outdated
Show resolved
Hide resolved
...s/core/src/main/scala/org/apache/spark/deploy/k8s/features/KubernetesFeatureConfigStep.scala
Outdated
Show resolved
Hide resolved
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala
Outdated
Show resolved
Hide resolved
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala
Outdated
Show resolved
Hide resolved
...s/core/src/main/scala/org/apache/spark/deploy/k8s/features/KubernetesFeatureConfigStep.scala
Outdated
Show resolved
Hide resolved
...s/core/src/main/scala/org/apache/spark/deploy/k8s/features/KubernetesFeatureConfigStep.scala
Outdated
Show resolved
Hide resolved
...ce-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesUtils.scala
Outdated
Show resolved
Hide resolved
@attilapiros Thanks for your review, I will address soon. (later) updated. |
551a9a2
to
d05b3d2
Compare
d05b3d2
to
7d3dd65
Compare
There was a problem hiding this 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.
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala
Outdated
Show resolved
Hide resolved
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala
Outdated
Show resolved
Hide resolved
...s/core/src/main/scala/org/apache/spark/deploy/k8s/features/KubernetesFeatureConfigStep.scala
Outdated
Show resolved
Hide resolved
...s/core/src/main/scala/org/apache/spark/deploy/k8s/features/KubernetesFeatureConfigStep.scala
Outdated
Show resolved
Hide resolved
...ce-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/PodBuilderSuite.scala
Outdated
Show resolved
Hide resolved
...ce-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/PodBuilderSuite.scala
Outdated
Show resolved
Hide resolved
55be5a7
to
a8c1db7
Compare
@attilapiros Thanks for your suggestion, it makes doc and test more clear and simple. Addressed. |
...ernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesDriverBuilder.scala
Outdated
Show resolved
Hide resolved
...ernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesDriverBuilder.scala
Outdated
Show resolved
Hide resolved
...s/core/src/main/scala/org/apache/spark/deploy/k8s/features/KubernetesFeatureConfigStep.scala
Outdated
Show resolved
Hide resolved
...ce-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/PodBuilderSuite.scala
Outdated
Show resolved
Hide resolved
...ernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesDriverBuilder.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
@dongjoon-hyun Thanks for your review, addressed. : ) |
206207b
to
c57f527
Compare
c57f527
to
c2a67b4
Compare
There was a problem hiding this 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.
@dongjoon-hyun @attilapiros Thanks for your help! |
Did I miss something from your comments, @attilapiros ? |
@dongjoon-hyun It is fine, I just planned to do another review round (the last one) and I got surprised it is already in. |
You can make comments still and we can handle it as follow-up PRs. Please let us know if you have any concern, @attilapiros . |
…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>
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 sideKubernetesExecutorCustomFeatureConfigStep
: to help user extend custom feature step in driver sideBefore this patch user can only add feature step like:
class TestStep extends KubernetesFeatureConfigStep
: without any kubernetes confAfter this patch user can add feature step with configuration like:
class TestStepWithDriverConf extends KubernetesDriverCustomFeatureConfigStep
: only driverclass TestStepWithExecConf extends KubernetesExecutorCustomFeatureConfigStep
: only executorclass TestStepWithK8SConf extends KubernetesDriverCustomFeatureConfigStep with KubernetesExecutorCustomFeatureConfigStep
: both driver and executorWhy 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?
build/sbt -Pkubernetes -Pkubernetes-integration-tests -Dtest.exclude.tags=minikube,r "kubernetes-integration-tests/test
Closes: #34924