diff options
author | Timothy Chen <tnachen@gmail.com> | 2016-05-03 18:04:04 -0700 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2016-05-03 18:04:04 -0700 |
commit | c1839c9911e37488230a68dec9041eb5958b6f1c (patch) | |
tree | e9cdce850b3c6b8bd97573e974d692e5dc194984 /core | |
parent | a8d56f538878443da6eae69449858ad4e2274151 (diff) | |
download | spark-c1839c9911e37488230a68dec9041eb5958b6f1c.tar.gz spark-c1839c9911e37488230a68dec9041eb5958b6f1c.tar.bz2 spark-c1839c9911e37488230a68dec9041eb5958b6f1c.zip |
[SPARK-14645][MESOS] Fix python running on cluster mode mesos to have non local uris
## What changes were proposed in this pull request?
Fix SparkSubmit to allow non-local python uris
## How was this patch tested?
Manually tested with mesos-spark-dispatcher
Author: Timothy Chen <tnachen@gmail.com>
Closes #12403 from tnachen/enable_remote_python.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala b/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala index 926e1ff7a8..755c4b6ec1 100644 --- a/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala +++ b/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala @@ -305,8 +305,9 @@ object SparkSubmit { } // 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 - if (args.isPython && !isYarnCluster) { + // 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 (Utils.nonLocalPaths(args.primaryResource).nonEmpty) { printErrorAndExit(s"Only local python files are supported: $args.primaryResource") } |