package features
Type Members
- trait KubernetesDriverCustomFeatureConfigStep extends KubernetesFeatureConfigStep
:: DeveloperApi ::
:: DeveloperApi ::
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 { 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. } }
- Annotations
- @Unstable() @DeveloperApi()
- trait KubernetesExecutorCustomFeatureConfigStep extends KubernetesFeatureConfigStep
:: DeveloperApi ::
:: DeveloperApi ::
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. } }
- Annotations
- @Unstable() @DeveloperApi()
- trait KubernetesFeatureConfigStep extends AnyRef
:: DeveloperApi ::
:: DeveloperApi ::
A collection of functions that together represent a "feature" in pods that are launched for Spark drivers and executors.
- Annotations
- @Unstable() @DeveloperApi()