vanzin commented on a change in pull request #24303: [SPARK-27394][WebUI]Flush 
LiveEntity if necessary when receiving SparkListenerExecutorMetricsUpdate
URL: https://github.com/apache/spark/pull/24303#discussion_r272404023
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/status/AppStatusListener.scala
 ##########
 @@ -831,6 +835,14 @@ private[spark] class AppStatusListener(
         }
       }
     }
+    // Flush updates if necessary. Executor heartbeat is an event that happens 
periodically. Flush
+    // here to ensure the staleness of Spark UI doesn't last more that the 
executor heartbeat
+    // interval.
+    if (now - lastFlushTimeNs > liveUpdatePeriodNs) {
+      flush(maybeUpdate(_, now))
 
 Review comment:
   Hmm... in the bug you mention that job-level data is not being updated. Is 
that the only case? Because if that's it, then this looks like overkill. You 
could e.g. update the jobs in the code that handles `event.accumUpdates` above, 
or even just flush jobs specifically, instead of everything.
   
   Doing a full flush here seems like overkill and a little expensive when you 
think about many heartbeats arriving in a short period (even when considering 
`lastFlushTimeNs`).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to