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 2019/02/01 15:06:51 UTC

[GitHub] skonto commented on a change in pull request #23599: [SPARK-24793][K8s] Enhance spark-submit for app management

skonto commented on a change in pull request #23599: [SPARK-24793][K8s] Enhance spark-submit for app management
URL: https://github.com/apache/spark/pull/23599#discussion_r253081358
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
 ##########
 @@ -95,20 +95,66 @@ private[spark] class SparkSubmit extends Logging {
   }
 
   /**
-   * Kill an existing submission using the REST protocol. Standalone and Mesos cluster mode only.
+   * Kill an existing submission.
+   * Standalone, Kubernetes and Mesos cluster mode only.
    */
   private def kill(args: SparkSubmitArguments): Unit = {
-    new RestSubmissionClient(args.master)
-      .killSubmission(args.submissionToKill)
+    if (args.master.startsWith("k8s://")) {
+      try {
+        val ops = Utils.classForName("org.apache.spark.deploy.k8s.submit.K8sSubmitOps$")
 
 Review comment:
   @vanzin 
   If you have an interface then you need to initialize an instance out of it. That means you need to use some form of class loading. Spark context is initializing the right cluster manager by using:
   ```
     private def getClusterManager(url: String): Option[ExternalClusterManager] = {
       val loader = Utils.getContextOrSparkClassLoader
       val serviceLoaders =
         ServiceLoader.load(classOf[ExternalClusterManager], loader).asScala.filter(_.canCreate(url))
   ....
   ```
   and picks up the META-INF/Services defined at build time. 
   Are you implying that I should use something like that?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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