HyukjinKwon commented on a change in pull request #35496:
URL: https://github.com/apache/spark/pull/35496#discussion_r805153748
##########
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:
Review comment:
```suggestion
* Example of driver feature step:
```
##########
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:
Can we add some comments within the block to explain what kind of codes
are expected? e.g.)
```scala
override def configurePod(pod: SparkPod): SparkPod = {
// blah blah
}
```
Or probably it should be best to show an actual working example for a
scenario.
##########
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 = {}
+ * }
+ * }}}
+ *
+ * Here is an example of feature step both for driver and executor:
Review comment:
```suggestion
* Example of feature step for both driver and executor:
```
##########
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 = {}
+ * }
+ * }}}
+ *
+ * Here is an example of feature step both for driver and executor:
+ *
+ * {{{
+ * class ExecutorExampleFeatureStep extends
KubernetesDriverCustomFeatureConfigStep
+ * with KubernetesExecutorCustomFeatureConfigStep {
Review comment:
```suggestion
* with KubernetesExecutorCustomFeatureConfigStep {
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]