Skip to content

Commit

Permalink
if app isnt found, reload apps from FS before giving up
Browse files Browse the repository at this point in the history
  • Loading branch information
squito committed Mar 10, 2015
1 parent c7d884f commit 0dc3ea7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ private[history] class FsHistoryProvider(conf: SparkConf) extends ApplicationHis

override def getAppUI(appId: String): Option[SparkUI] = {
try {
applications.get(appId).map { info =>
val appOpt = applications.get(appId).orElse {
getListing(true)
applications.get(appId)
}
appOpt.map { info =>
val replayBus = new ReplayListenerBus()
val ui = {
val conf = this.conf.clone()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class HistoryServer(

private val appLoader = new CacheLoader[String, SparkUI] {
override def load(key: String): SparkUI = {
val ui = provider.getAppUI(key).getOrElse(throw new NoSuchElementException())
val ui = provider.getAppUI(key).getOrElse(throw new NoSuchElementException(s"no app with key $key"))
attachSparkUI(ui)
ui
}
Expand Down

0 comments on commit 0dc3ea7

Please sign in to comment.