Skip to content

Commit

Permalink
Allow specifying non-local files to spark-submit (python files, and R…
Browse files Browse the repository at this point in the history
… files) when isKubernetes is set (apache-spark-on-k8s#527)
  • Loading branch information
paulreimer committed Oct 18, 2017
1 parent f94499b commit 79ffa72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ object SparkSubmit extends CommandLineUtils {
// Require all python files to be local, so we can add them to the PYTHONPATH
// In YARN cluster mode, python files are distributed as regular files, which can be non-local.
// In Mesos cluster mode, non-local python files are automatically downloaded by Mesos.
if (args.isPython && !isYarnCluster && !isMesosCluster) {
if (args.isPython && !isYarnCluster && !isMesosCluster && !isKubernetesCluster) {
if (Utils.nonLocalPaths(args.primaryResource).nonEmpty) {
printErrorAndExit(s"Only local python files are supported: ${args.primaryResource}")
}
Expand All @@ -336,7 +336,7 @@ object SparkSubmit extends CommandLineUtils {
}

// Require all R files to be local
if (args.isR && !isYarnCluster && !isMesosCluster) {
if (args.isR && !isYarnCluster && !isMesosCluster && !isKubernetesCluster) {
if (Utils.nonLocalPaths(args.primaryResource).nonEmpty) {
printErrorAndExit(s"Only local R files are supported: ${args.primaryResource}")
}
Expand Down

0 comments on commit 79ffa72

Please # to comment.