diff options
Diffstat (limited to 'core/src/main/scala/spark/HttpFileServer.scala')
-rw-r--r-- | core/src/main/scala/spark/HttpFileServer.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/src/main/scala/spark/HttpFileServer.scala b/core/src/main/scala/spark/HttpFileServer.scala index e6ad4dd28e..05ca846c85 100644 --- a/core/src/main/scala/spark/HttpFileServer.scala +++ b/core/src/main/scala/spark/HttpFileServer.scala @@ -20,7 +20,7 @@ class HttpFileServer extends Logging { fileDir.mkdir() jarDir.mkdir() logInfo("HTTP File server directory is " + baseDir) - httpServer = new HttpServer(fileDir) + httpServer = new HttpServer(baseDir) httpServer.start() serverUri = httpServer.uri } @@ -30,11 +30,13 @@ class HttpFileServer extends Logging { } def addFile(file: File) : String = { - return addFileToDir(file, fileDir) + addFileToDir(file, fileDir) + return serverUri + "/files/" + file.getName } def addJar(file: File) : String = { - return addFileToDir(file, jarDir) + addFileToDir(file, jarDir) + return serverUri + "/jars/" + file.getName } def addFileToDir(file: File, dir: File) : String = { |