You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/04/05 00:02:48 UTC

[GitHub] [spark] zsxwing commented on a change in pull request #24303: [SPARK-27394][WebUI]Flush LiveEntity if necessary when receiving SparkListenerExecutorMetricsUpdate

zsxwing 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_r272409074
 
 

 ##########
 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?
   
   I also noticed that executor active tasks sometimes could be wrong. That's why I decided to flush everything to make sure we don't miss any places. It's also hard to maintain if we need to manually flush in every place.
   
   Ideally, we should flush periodically so that it doesn't depend on receiving a Spark event. But then I will need to add a new event type and post to the listener bus. That's overkilled.
   
   > when you think about many heartbeats arriving in a short period
   
   At least there will be at least 100ms between each flush. As long as we process heart beats very fast, most of them won't trigger the flush.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org