GitHub user juliuszsompolski opened a pull request: https://github.com/apache/spark/pull/21171
[SPARK-24104] SQLAppStatusListener overwrites metrics onDriverAccumUpdates instead of updating them ## What changes were proposed in this pull request? Event `SparkListenerDriverAccumUpdates` may happen multiple times in a query - e.g. every `FileSourceScanExec` and `BroadcastExchangeExec` call `postDriverMetricUpdates`. In Spark 2.2 `SQLListener` updated the map with new values. `SQLAppStatusListener` overwrites it. Unless `update` preserved it in the KV store (dependant on `exec.lastWriteTime`), only the metrics from the last operator that does `postDriverMetricUpdates` are preserved. ## How was this patch tested? Unit test added. You can merge this pull request into a Git repository by running: $ git pull https://github.com/juliuszsompolski/apache-spark SPARK-24104 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/21171.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #21171 ---- commit 69e09cc770514bdb7964b8552456bf7a83df7588 Author: Juliusz Sompolski <julek@...> Date: 2018-04-26T17:52:04Z onDriverAccumUpdates ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org