-
Notifications
You must be signed in to change notification settings - Fork 117
[WIP] Submission client redesign to use a step-based builder pattern #363
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -621,14 +621,22 @@ object SparkSubmit { | |
| if (isKubernetesCluster) { | ||
| childMainClass = "org.apache.spark.deploy.kubernetes.submit.Client" | ||
| if (args.isPython) { | ||
| childArgs += "--py-file" | ||
| childArgs += args.primaryResource | ||
| childArgs += "--main-class" | ||
| childArgs += "org.apache.spark.deploy.PythonRunner" | ||
| childArgs += "--other-py-files" | ||
| childArgs += args.pyFiles | ||
| } else { | ||
| childArgs += "--primary-java-resource" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. java and python resources can be resolved with just a check if it ends with
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general I'm against having logic that requires file names to have a certain extension.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It makes the code brittle; if upstream spark-submit starts giving us Python files with extensions that aren't |
||
| childArgs += args.primaryResource | ||
| childArgs += "--main-class" | ||
| childArgs += args.mainClass | ||
| } | ||
| childArgs ++= args.childArgs | ||
| args.childArgs.foreach { arg => | ||
| childArgs += "--arg" | ||
| childArgs += arg | ||
| } | ||
| } | ||
|
|
||
| // Load any properties specified through --conf and the default properties file | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.spark.deploy.kubernetes | ||
|
|
||
| import io.fabric8.kubernetes.api.model.{Container, Pod} | ||
|
|
||
| private[spark] case class PodWithDetachedInitContainer( | ||
| pod: Pod, | ||
| initContainer: Container, | ||
| mainContainer: Container) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming convention, for the sake of consistency, should make this
--primary-py-file