Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/10284#discussion_r47560365
--- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala
---
@@ -924,49 +939,74 @@ private[deploy] class Master(
* Return the UI if successful, else None
*/
private[master] def rebuildSparkUI(app: ApplicationInfo):
Option[SparkUI] = {
+ val futureUI = asyncRebuildSparkUI(app)
+
+ // Wait until the UI is rebuilt or cancelled, log status occasionally
for apps with many events
+ var waitSec = 2
+ do {
+ try {
+ val ui = Await.result(futureUI, Duration(waitSec,
TimeUnit.SECONDS))
+ return Some(ui)
+ } catch {
+ case te: TimeoutException =>
+ waitSec *= 2
+ logInfo(s"Application UI is rebuilding, will continue to wait
$waitSec seconds")
+ case NonFatal(_) | _: InterruptedException =>
+ waitSec = 0
+ }
+ } while (waitSec > 0)
--- End diff --
This feature could be useful, but it's technically not SPARK-12062 and only
used in the REST API now. Especially since we plan to remove rebuilding this on
the Master altogether in Spark 2.0 I'd just await on the future for simplicity.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]