Skip to content

Commit

Permalink
address vanzin's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lianhuiwang committed Apr 30, 2015
1 parent 4b8a3ed commit e7bd971
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
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 @@ -361,9 +361,9 @@ object SparkSubmit {
val localURI = Utils.resolveURI(localPath)
if (localURI.getScheme != "local") {
args.files = mergeFileLists(args.files, localURI.toString)
(new Path(localPath)).getName
new Path(localPath).getName
} else {
localURI.getPath.toString
localURI.getPath
}
}.mkString(File.pathSeparator)
sysProps("spark.submit.pyArchives") = pyArchives
Expand Down
9 changes: 5 additions & 4 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,13 @@ object PySparkAssembly {
val src = new File(BuildCommons.sparkHome, "python/pyspark")

val zipFile = new File(BuildCommons.sparkHome , "python/lib/pyspark.zip")
IO.delete(zipFile)
zipFile.delete()
def entries(f: File):List[File] =
f :: (if (f.isDirectory) IO.listFiles(f).toList.flatMap(entries(_)) else Nil)
IO.zip(entries(src).map(
d => (d, d.getAbsolutePath.substring(src.getParent.length +1))),
zipFile)
val sources = entries(src).map { d =>
(d, d.getAbsolutePath.substring(src.getParent.length +1))
}
IO.zip(sources, zipFile)

val dst = new File(outDir, "pyspark")
if (!dst.isDirectory()) {
Expand Down

0 comments on commit e7bd971

Please sign in to comment.