Repository: spark
Updated Branches:
  refs/heads/branch-1.1 3bb5d13f1 -> e19c70f95


[SPARK-4989][CORE] backport for branch-1.1 catch eventlog exception for wrong 
eventlog conf

JIRA is [SPARK-4989](https://issues.apache.org/jira/browse/SPARK-4989)

Author: Zhang, Liye <[email protected]>

Closes #3970 from liyezhang556520/apache-branch-1.1 and squashes the following 
commits:

93fa427 [Zhang, Liye] catch eventlog exception for wrong eventlog conf


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

Branch: refs/heads/branch-1.1
Commit: e19c70f9555a8141d8939b30902f297995c322a4
Parents: 3bb5d13
Author: Zhang, Liye <[email protected]>
Authored: Wed Jan 28 13:09:33 2015 -0800
Committer: Andrew Or <[email protected]>
Committed: Wed Jan 28 13:09:33 2015 -0800

----------------------------------------------------------------------
 .../org/apache/spark/deploy/master/Master.scala | 32 ++++++++++----------
 1 file changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/e19c70f9/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala 
b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
index 8d99ed4..abbc6e7 100644
--- a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
@@ -679,23 +679,23 @@ private[spark] class Master(
       app.desc.appUiUrl = notFoundBasePath
       return false
     }
-    val fileSystem = Utils.getHadoopFileSystem(eventLogDir)
-    val eventLogInfo = EventLoggingListener.parseLoggingInfo(eventLogDir, 
fileSystem)
-    val eventLogPaths = eventLogInfo.logPaths
-    val compressionCodec = eventLogInfo.compressionCodec
-
-    if (eventLogPaths.isEmpty) {
-      // Event logging is enabled for this application, but no event logs are 
found
-      val title = s"Application history not found (${app.id})"
-      var msg = s"No event logs found for application $appName in 
$eventLogDir."
-      logWarning(msg)
-      msg += " Did you specify the correct logging directory?"
-      msg = URLEncoder.encode(msg, "UTF-8")
-      app.desc.appUiUrl = notFoundBasePath + s"?msg=$msg&title=$title"
-      return false
-    }
-
     try {
+      val fileSystem = Utils.getHadoopFileSystem(eventLogDir)
+      val eventLogInfo = EventLoggingListener.parseLoggingInfo(eventLogDir, 
fileSystem)
+      val eventLogPaths = eventLogInfo.logPaths
+      val compressionCodec = eventLogInfo.compressionCodec
+
+      if (eventLogPaths.isEmpty) {
+        // Event logging is enabled for this application, but no event logs 
are found
+        val title = s"Application history not found (${app.id})"
+        var msg = s"No event logs found for application $appName in 
$eventLogDir."
+        logWarning(msg)
+        msg += " Did you specify the correct logging directory?"
+        msg = URLEncoder.encode(msg, "UTF-8")
+        app.desc.appUiUrl = notFoundBasePath + s"?msg=$msg&title=$title"
+        return false
+      }
+
       val replayBus = new ReplayListenerBus(eventLogPaths, fileSystem, 
compressionCodec)
       val ui = new SparkUI(new SparkConf, replayBus, appName + " (completed)",
         HistoryServer.UI_PATH_PREFIX + s"/${app.id}")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to