File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
core/src/main/scala/org/apache/spark/deploy Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -258,18 +258,18 @@ object SparkSubmit {
258258 SparkSubmitUtils .resolveMavenCoordinates(
259259 args.packages, Option (args.repositories), Option (args.ivyRepoPath))
260260 if (! resolvedMavenCoordinates.trim.isEmpty) {
261- if (args.jars == null || args.jars.trim.isEmpty) {
262- args.jars = resolvedMavenCoordinates
263- } else {
264- args.jars += s " , $resolvedMavenCoordinates"
265- }
266- if (args.isPython) {
267- if (args.pyFiles == null || args.pyFiles.trim.isEmpty) {
268- args.pyFiles = resolvedMavenCoordinates
261+ def addMavenDependenciesToOption (option : String ): String = {
262+ if (option == null || option.trim.isEmpty) {
263+ resolvedMavenCoordinates
269264 } else {
270- args.pyFiles += s " , $resolvedMavenCoordinates"
265+ option + s " , $resolvedMavenCoordinates"
271266 }
272267 }
268+ args.jars = addMavenDependenciesToOption(args.jars)
269+ args.driverExtraClassPath = addMavenDependenciesToOption(args.driverExtraClassPath)
270+ if (args.isPython) {
271+ args.pyFiles = addMavenDependenciesToOption(args.pyFiles)
272+ }
273273 }
274274
275275 // Require all python files to be local, so we can add them to the PYTHONPATH
You can’t perform that action at this time.
0 commit comments