From bb4c503597f291fd26bd7e26639416a6faf4488a Mon Sep 17 00:00:00 2001 From: Andrew Or Date: Mon, 3 Mar 2014 18:36:13 -0800 Subject: [PATCH] Use a more mnemonic path for logging Also get rid of a couple of unused vals. --- core/src/main/scala/org/apache/spark/ui/UISparkListener.scala | 3 ++- .../src/main/scala/org/apache/spark/ui/env/EnvironmentUI.scala | 2 -- core/src/main/scala/org/apache/spark/ui/exec/ExecutorsUI.scala | 2 -- .../scala/org/apache/spark/ui/storage/BlockManagerUI.scala | 2 -- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/ui/UISparkListener.scala b/core/src/main/scala/org/apache/spark/ui/UISparkListener.scala index fb95ca5cdb5b2..4d109c270548c 100644 --- a/core/src/main/scala/org/apache/spark/ui/UISparkListener.scala +++ b/core/src/main/scala/org/apache/spark/ui/UISparkListener.scala @@ -54,8 +54,9 @@ private[ui] class GatewayUISparkListener(parent: SparkUI, sc: SparkContext) exte private val logger: Option[FileLogger] = { if (sc != null && sc.conf.getBoolean("spark.eventLog.enabled", false)) { val logDir = sc.conf.get("spark.eventLog.dir", "/tmp/spark-events") + val appName = sc.appName.replaceAll("[ /]", "_").toLowerCase val overwrite = sc.conf.getBoolean("spark.eventLog.overwrite", true) - Some(new FileLogger(logDir, overwriteExistingFiles = overwrite)) + Some(new FileLogger(logDir, appName, overwriteExistingFiles = overwrite)) } else None } diff --git a/core/src/main/scala/org/apache/spark/ui/env/EnvironmentUI.scala b/core/src/main/scala/org/apache/spark/ui/env/EnvironmentUI.scala index c536fde3efc4c..5c3b2216eaa20 100644 --- a/core/src/main/scala/org/apache/spark/ui/env/EnvironmentUI.scala +++ b/core/src/main/scala/org/apache/spark/ui/env/EnvironmentUI.scala @@ -31,8 +31,6 @@ import org.apache.spark.ui._ private[ui] class EnvironmentUI(parent: SparkUI) { lazy val appName = parent.appName lazy val listener = _listener.get - val live = parent.live - val sc = parent.sc private var _listener: Option[EnvironmentListener] = None diff --git a/core/src/main/scala/org/apache/spark/ui/exec/ExecutorsUI.scala b/core/src/main/scala/org/apache/spark/ui/exec/ExecutorsUI.scala index 854f0c8b70e43..f9a0155afa5af 100644 --- a/core/src/main/scala/org/apache/spark/ui/exec/ExecutorsUI.scala +++ b/core/src/main/scala/org/apache/spark/ui/exec/ExecutorsUI.scala @@ -34,8 +34,6 @@ import org.apache.spark.util.Utils private[ui] class ExecutorsUI(parent: SparkUI) { lazy val appName = parent.appName lazy val listener = _listener.get - val live = parent.live - val sc = parent.sc private var _listener: Option[ExecutorsListener] = None diff --git a/core/src/main/scala/org/apache/spark/ui/storage/BlockManagerUI.scala b/core/src/main/scala/org/apache/spark/ui/storage/BlockManagerUI.scala index 4b59c9609045e..73d1dc73066ca 100644 --- a/core/src/main/scala/org/apache/spark/ui/storage/BlockManagerUI.scala +++ b/core/src/main/scala/org/apache/spark/ui/storage/BlockManagerUI.scala @@ -28,8 +28,6 @@ import org.apache.spark.ui._ private[ui] class BlockManagerUI(parent: SparkUI) { lazy val appName = parent.appName lazy val listener = _listener.get - val live = parent.live - val sc = parent.sc private val indexPage = new IndexPage(this) private val rddPage = new RDDPage(this)