Skip to content

Commit e7bd971

Browse files
committed
address vanzin's comments
1 parent 4b8a3ed commit e7bd971

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

project/SparkBuild.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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()) {

0 commit comments

Comments
 (0)