Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Allow specifying non-local files to spark-submit (python files, and R files) #530

Open
wants to merge 4 commits into
base: branch-2.2-kubernetes
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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