Skip to content

Commit

Permalink
Added error message for the case app summary is not ready.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarutak committed Jun 13, 2020
1 parent f535004 commit 903574e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,13 @@ private[spark] class AppStatusStore(
}

def appSummary(): AppSummary = {
store.read(classOf[AppSummary], classOf[AppSummary].getName())
try {
store.read(classOf[AppSummary], classOf[AppSummary].getName())
} catch {
case _: NoSuchElementException =>
throw new NoSuchElementException("Failed to get the application summary. " +
"If you are starting up Spark, please wait a while until it's ready.")
}
}

def close(): Unit = {
Expand Down

0 comments on commit 903574e

Please sign in to comment.