HeartSaVioR commented on a change in pull request #26821:
[SPARK-20656][CORE]Support Incremental parsing of event logs in SHS
URL: https://github.com/apache/spark/pull/26821#discussion_r357029958
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListener.scala
##########
@@ -66,6 +68,29 @@ class SQLAppStatusListener(
// away.
exec.metricsValues = aggregateMetrics(exec)
exec.write(kvstore, now)
+ if (appId != null) {
+ kvstore.write(new SQLAppStatusListenerData(appId, attemptId,
+ liveExecutions, stageMetrics))
+ }
+ }
+ }
+ }
+
+ def initialize(appId: String, attemptId: Option[String]): Unit = {
+ if (!live) {
+ this.appId = appId
+ this.attemptId = attemptId
+ try {
+ val listenerData = kvstore.read(classOf[SQLAppStatusListenerData],
+ Array(Some(appId), attemptId))
+ listenerData.liveExecutions.entrySet().asScala.foreach { entry =>
+ liveExecutions.put(entry.getKey, entry.getValue)
Review comment:
exec.metricsValues may need to be reset to null, see comment on
`kvstore.onFlush`
----------------------------------------------------------------
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]