Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1336#discussion_r15072986
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala 
---
    @@ -667,29 +664,47 @@ private[spark] class Master(
        */
       def rebuildSparkUI(app: ApplicationInfo): Boolean = {
         val appName = app.desc.name
    -    val eventLogDir = app.desc.eventLogDir.getOrElse { return false }
    +    val eventLogDir = app.desc.eventLogDir.getOrElse {
    +      // Event logging is not enabled for this application
    +      app.desc.appUiUrl = "/history/not-found"
    +      return false
    +    }
         val fileSystem = Utils.getHadoopFileSystem(eventLogDir)
         val eventLogInfo = EventLoggingListener.parseLoggingInfo(eventLogDir, 
fileSystem)
         val eventLogPaths = eventLogInfo.logPaths
         val compressionCodec = eventLogInfo.compressionCodec
    -    if (!eventLogPaths.isEmpty) {
    -      try {
    -        val replayBus = new ReplayListenerBus(eventLogPaths, fileSystem, 
compressionCodec)
    -        val ui = new SparkUI(
    -          new SparkConf, replayBus, appName + " (completed)", "/history/" 
+ app.id)
    -        replayBus.replay()
    -        app.desc.appUiUrl = ui.basePath
    -        appIdToUI(app.id) = ui
    -        webUi.attachSparkUI(ui)
    -        return true
    -      } catch {
    -        case e: Exception =>
    -          logError("Exception in replaying log for application %s 
(%s)".format(appName, app.id), e)
    -      }
    -    } else {
    -      logWarning("Application %s (%s) has no valid logs: 
%s".format(appName, app.id, eventLogDir))
    +
    +    if (eventLogPaths.isEmpty) {
    --- End diff --
    
    What happens here if `eventLogDir` doesn't exist?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to