You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/02/13 03:38:36 UTC

[GitHub] [spark] Yikun commented on a change in pull request #35496: [SPARK-37145][K8S][FOLLOWUP] Add note for KubernetesDriverCustomFeatureConfigStep

Yikun commented on a change in pull request #35496:
URL: https://github.com/apache/spark/pull/35496#discussion_r805237606



##########
File path: resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/KubernetesDriverCustomFeatureConfigStep.scala
##########
@@ -25,6 +25,39 @@ 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.
+ *
+ * Here is an example of driver feature step:
+ *
+ * {{{
+ *   class DriverExampleFeatureStep extends KubernetesDriverCustomFeatureConfigStep {
+ *     private var driverConf: KubernetesDriverConf = _
+ *
+ *     override def init(conf: KubernetesDriverConf): Unit = {
+ *       driverConf = conf
+ *     }
+ *
+ *     override def configurePod(pod: SparkPod): SparkPod = {}

Review comment:
       ```scala
   // Implements the methods of `KubernetesFeatureConfigStep`, such as `configurePod`
   override def configurePod(pod: SparkPod): SparkPod = {
     // Apply modifications on the given pod in accordance to this feature.
   }
   ```
   
   How about this? This doc is more for giving a exmaple to introduce how to initialize according input configuration.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org