diff options
author | Christoph Grothaus <cgrothaus@zeb.de> | 2013-02-18 13:54:01 +0100 |
---|---|---|
committer | Christoph Grothaus <cgrothaus@zeb.de> | 2013-03-22 11:08:40 +0100 |
commit | 445f387ef4213b5b63f28cbc011236c2aba1d1c9 (patch) | |
tree | 75be07677a4c4b4eccdea287b77e49d52e92b572 /core | |
parent | 4c5efcf600f75d3020d4e83a27c072e4e77607ac (diff) | |
download | spark-445f387ef4213b5b63f28cbc011236c2aba1d1c9.tar.gz spark-445f387ef4213b5b63f28cbc011236c2aba1d1c9.tar.bz2 spark-445f387ef4213b5b63f28cbc011236c2aba1d1c9.zip |
Bugfix: WorkerWebUI must respect workDirPath from Worker
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/spark/deploy/worker/Worker.scala | 2 | ||||
-rw-r--r-- | core/src/main/scala/spark/deploy/worker/WorkerWebUI.scala | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/core/src/main/scala/spark/deploy/worker/Worker.scala b/core/src/main/scala/spark/deploy/worker/Worker.scala index da3f4f636c..8919d1261c 100644 --- a/core/src/main/scala/spark/deploy/worker/Worker.scala +++ b/core/src/main/scala/spark/deploy/worker/Worker.scala @@ -81,7 +81,7 @@ private[spark] class Worker( } def startWebUi() { - val webUi = new WorkerWebUI(context.system, self) + val webUi = new WorkerWebUI(context.system, self, workDir) try { AkkaUtils.startSprayServer(context.system, "0.0.0.0", webUiPort, webUi.handler) } catch { diff --git a/core/src/main/scala/spark/deploy/worker/WorkerWebUI.scala b/core/src/main/scala/spark/deploy/worker/WorkerWebUI.scala index 135cc2e86c..c834f87d50 100644 --- a/core/src/main/scala/spark/deploy/worker/WorkerWebUI.scala +++ b/core/src/main/scala/spark/deploy/worker/WorkerWebUI.scala @@ -12,12 +12,13 @@ import cc.spray.typeconversion.SprayJsonSupport._ import spark.deploy.{WorkerState, RequestWorkerState} import spark.deploy.JsonProtocol._ +import java.io.File /** * Web UI server for the standalone worker. */ private[spark] -class WorkerWebUI(val actorSystem: ActorSystem, worker: ActorRef) extends Directives { +class WorkerWebUI(val actorSystem: ActorSystem, worker: ActorRef, workDir: File) extends Directives { val RESOURCE_DIR = "spark/deploy/worker/webui" val STATIC_RESOURCE_DIR = "spark/deploy/static" @@ -43,7 +44,7 @@ class WorkerWebUI(val actorSystem: ActorSystem, worker: ActorRef) extends Direct path("log") { parameters("appId", "executorId", "logType") { (appId, executorId, logType) => respondWithMediaType(cc.spray.http.MediaTypes.`text/plain`) { - getFromFileName("work/" + appId + "/" + executorId + "/" + logType) + getFromFileName(workDir.getPath() + "/" + appId + "/" + executorId + "/" + logType) } } } ~ |