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][FOLLOWUP] Add note for KubernetesCustom[Driver/Executor]FeatureConfigStep #35496

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,45 @@ import org.apache.spark.deploy.k8s.KubernetesDriverConf
* A base interface to help user extend custom feature step in driver side.
* Note: If your custom feature step would be used only in driver or both in driver and executor,
* please use this.
*
* Example of driver feature step:
*
* {{{
* class DriverExampleFeatureStep extends KubernetesDriverCustomFeatureConfigStep {
* private var driverConf: KubernetesDriverConf = _
*
* override def init(conf: KubernetesDriverConf): Unit = {
* driverConf = conf
* }
*
* // Implements methods of `KubernetesFeatureConfigStep`, such as `configurePod`
* override def configurePod(pod: SparkPod): SparkPod = {
* // Apply modifications on the given pod in accordance to this feature.
* }
* }
* }}}
*
* Example of feature step for both driver and executor:
*
* {{{
* class DriverAndExecutorExampleFeatureStep extends KubernetesDriverCustomFeatureConfigStep
* with KubernetesExecutorCustomFeatureConfigStep {
Yikun marked this conversation as resolved.
Show resolved Hide resolved
* private var kubernetesConf: KubernetesConf = _
*
* override def init(conf: KubernetesDriverConf): Unit = {
* kubernetesConf = conf
* }
*
* override def init(conf: KubernetesExecutorConf): Unit = {
* kubernetesConf = conf
* }
*
* // Implements methods of `KubernetesFeatureConfigStep`, such as `configurePod`
* override def configurePod(pod: SparkPod): SparkPod = {
* // Apply modifications on the given pod in accordance to this feature.
* }
* }
* }}}
*/
@Unstable
@DeveloperApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,45 @@ import org.apache.spark.deploy.k8s.KubernetesExecutorConf
* A base interface to help user extend custom feature step in executor side.
* Note: If your custom feature step would be used only in driver or both in driver and executor,
* please use this.
*
* Example of executor feature step:
*
* {{{
* class ExecutorExampleFeatureStep extends KubernetesExecutorCustomFeatureConfigStep {
* private var executorConf: KubernetesExecutorConf = _
*
* override def init(conf: KubernetesExecutorConf): Unit = {
* executorConf = conf
* }
*
* // Implements methods of `KubernetesFeatureConfigStep`, such as `configurePod`
* override def configurePod(pod: SparkPod): SparkPod = {
* // Apply modifications on the given pod in accordance to this feature.
* }
* }
* }}}
*
* Example of feature step for both driver and executor:
*
* {{{
* class DriverAndExecutorExampleFeatureStep extends KubernetesDriverCustomFeatureConfigStep
* with KubernetesExecutorCustomFeatureConfigStep {
* private var kubernetesConf: KubernetesConf = _
*
* override def init(conf: KubernetesDriverConf): Unit = {
* kubernetesConf = conf
* }
*
* override def init(conf: KubernetesExecutorConf): Unit = {
* kubernetesConf = conf
* }
*
* // Implements methods of `KubernetesFeatureConfigStep`, such as `configurePod`
* override def configurePod(pod: SparkPod): SparkPod = {
* // Apply modifications on the given pod in accordance to this feature.
* }
* }
* }}}
*/
@Unstable
@DeveloperApi
Expand Down