You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2013/11/01 23:40:37 UTC

[2/3] git commit: Add local: URI support to addFile as well

Add local: URI support to addFile as well


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/f3679fd4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/f3679fd4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/f3679fd4

Branch: refs/heads/master
Commit: f3679fd494893d4feafec5c44d31adf1ee3aa2dc
Parents: e54a37f
Author: Evan Chan <ev...@ooyala.com>
Authored: Fri Nov 1 11:08:03 2013 -0700
Committer: Evan Chan <ev...@ooyala.com>
Committed: Fri Nov 1 11:08:03 2013 -0700

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/SparkContext.scala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/f3679fd4/core/src/main/scala/org/apache/spark/SparkContext.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/SparkContext.scala b/core/src/main/scala/org/apache/spark/SparkContext.scala
index 8d7c5a7..880b49e 100644
--- a/core/src/main/scala/org/apache/spark/SparkContext.scala
+++ b/core/src/main/scala/org/apache/spark/SparkContext.scala
@@ -591,7 +591,8 @@ class SparkContext(
     val uri = new URI(path)
     val key = uri.getScheme match {
       case null | "file" => env.httpFileServer.addFile(new File(uri.getPath))
-      case _ => path
+      case "local"       => "file:" + uri.getPath
+      case _             => path
     }
     addedFiles(key) = System.currentTimeMillis