vanzin commented on a change in pull request #23939: [SPARK-27019]
[webUI]onJobStart happens after onExecutionEnd shouldn't overwrite kvstore
URL: https://github.com/apache/spark/pull/23939#discussion_r262281589
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListener.scala
##########
@@ -112,6 +133,13 @@ class SQLAppStatusListener(
}
exec.jobs = exec.jobs + (event.jobId -> result)
exec.endEvents += 1
+ // If the jobStart event happened after executionEnd event, remove
both stage metrics data
+ // and liveExecution data on the last jobEnd
+ if(exec.endEvents == exec.jobs.size && exec.isStoreReadData) {
Review comment:
Space after `if`.
Also I'm not sure about this logic. It looks redundant to me, in that it
would only ever happen if a job start event arrives after an execution end. It
also feels weird to increment `endEvents` here. Don't you get a job end event
too?
BTW that's what you use comments for.
----------------------------------------------------------------
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]