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



##########
File path: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesUtils.scala
##########
@@ -381,4 +382,13 @@ object KubernetesUtils extends Logging {
       }
     }
   }
+
+  // Load and init custom feature step according to `className` and `conf`
+  // This method is used by `KubernetesDriverBuilder` and 
`KubernetesExecutorBuilder`
+  @Since("3.3.0")
+  def loadFeatureStep(conf: KubernetesConf, className: String): 
KubernetesFeatureConfigStep = {

Review comment:
       > Regarding `KubernetesCustomFeatureConfigStep` I won't introduce the 
init at all.
   
   `KubernetesCustomFeatureConfigStep` is used for a custom feature step  with 
base KubernetesConf, can be shared by driver and executor. and previous 
`KubernetesFeatureConfigStep` can without conf.
   
   So I guess then final look is like below:
   ```scala
           val initializedFeature = feature match {
             // Since 3.3, allow user implements feature with 
KubernetesExecutorConf
             case e: KubernetesExecutorCustomFeatureConfigStep =>
               e.init(conf)
               Some(e)
             // raise SparkException with wrong type feature step
             case _: KubernetesDriverCustomFeatureConfigStep =>
               None
             // Since 3.3, allow user implements feature with KubernetesConf
             case c: KubernetesCustomFeatureConfigStep =>
               c.init(conf)
               Some(c)
             // Since 3.2, allow user implements feature without config
             case f: KubernetesFeatureConfigStep =>
               Some(f)
             case _ => None
           }
   ```
   
   WDYT?




-- 
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]

Reply via email to