-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-22962][K8S] Fail fast if submission client local files are used #20320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 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 |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ import java.util.UUID | |
|
|
||
| import com.google.common.primitives.Longs | ||
|
|
||
| import org.apache.spark.SparkConf | ||
| import org.apache.spark.{SparkConf, SparkException} | ||
| import org.apache.spark.deploy.k8s.{KubernetesUtils, MountSecretsBootstrap} | ||
| import org.apache.spark.deploy.k8s.Config._ | ||
| import org.apache.spark.deploy.k8s.Constants._ | ||
|
|
@@ -117,6 +117,13 @@ private[spark] class DriverConfigOrchestrator( | |
| .map(_.split(",")) | ||
| .getOrElse(Array.empty[String]) | ||
|
|
||
| // TODO(SPARK-23153): remote once submission client local dependencies are supported. | ||
|
||
| if (existSubmissionLocalFiles(sparkJars) || existSubmissionLocalFiles(sparkFiles)) { | ||
|
Contributor
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. We can add a
Contributor
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. Done, and also created https://issues.apache.org/jira/browse/SPARK-23153. |
||
| throw new SparkException("The Kubernetes mode does not yet support application " + | ||
|
||
| "dependencies from the submission client's local file system. It currently only allows " + | ||
| "application dependencies locally in the container or that can be downloaded remotely.") | ||
| } | ||
|
|
||
| val dependencyResolutionStep = if (sparkJars.nonEmpty || sparkFiles.nonEmpty) { | ||
| Seq(new DependencyResolutionStep( | ||
| sparkJars, | ||
|
|
@@ -162,6 +169,12 @@ private[spark] class DriverConfigOrchestrator( | |
| initContainerBootstrapStep | ||
| } | ||
|
|
||
| private def existSubmissionLocalFiles(files: Seq[String]): Boolean = { | ||
| files.exists { uri => | ||
| Utils.resolveURI(uri).getScheme == "file" | ||
| } | ||
| } | ||
|
|
||
| private def existNonContainerLocalFiles(files: Seq[String]): Boolean = { | ||
| files.exists { uri => | ||
| Utils.resolveURI(uri).getScheme != "local" | ||
|
|
||
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.
The point above already covers that
local://is needed with custom-built images.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.
Yes, but that's about adding to the classpath. I wanted to make it more specific and clearer.