File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
core/src/main/scala/org/apache/spark/deploy Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -361,9 +361,9 @@ object SparkSubmit {
361361 val localURI = Utils .resolveURI(localPath)
362362 if (localURI.getScheme != " local" ) {
363363 args.files = mergeFileLists(args.files, localURI.toString)
364- ( new Path (localPath) ).getName
364+ new Path (localPath).getName
365365 } else {
366- localURI.getPath.toString
366+ localURI.getPath
367367 }
368368 }.mkString(File .pathSeparator)
369369 sysProps(" spark.submit.pyArchives" ) = pyArchives
Original file line number Diff line number Diff line change @@ -364,12 +364,13 @@ object PySparkAssembly {
364364 val src = new File (BuildCommons .sparkHome, " python/pyspark" )
365365
366366 val zipFile = new File (BuildCommons .sparkHome , " python/lib/pyspark.zip" )
367- IO .delete(zipFile )
367+ zipFile .delete()
368368 def entries (f : File ): List [File ] =
369369 f :: (if (f.isDirectory) IO .listFiles(f).toList.flatMap(entries(_)) else Nil )
370- IO .zip(entries(src).map(
371- d => (d, d.getAbsolutePath.substring(src.getParent.length + 1 ))),
372- zipFile)
370+ val sources = entries(src).map { d =>
371+ (d, d.getAbsolutePath.substring(src.getParent.length + 1 ))
372+ }
373+ IO .zip(sources, zipFile)
373374
374375 val dst = new File (outDir, " pyspark" )
375376 if (! dst.isDirectory()) {
You can’t perform that action at this time.
0 commit comments