GitHub user yogeshg opened a pull request: https://github.com/apache/spark/pull/22912
[SPARK-25901] Use only one thread in BarrierTaskContext companion object ## What changes were proposed in this pull request? Now we use only one `timer` (and thus a backing thread) in `BarrierTaskContext` companion object, and the objects can add `timerTasks` to that `timer`. ## How was this patch tested? This was tested manually by generating logs and seeing that they look the same as ones before, namely, that is, a partition waiting on another partition for 5seconds generates 4-5 log messages when the frequency of logging is set to 1second. You can merge this pull request into a Git repository by running: $ git pull https://github.com/yogeshg/spark thread Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/22912.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 #22912 ---- commit 63724e43de39f864538538b0c1bd11f0ae06fdf8 Author: Yogesh Garg <1059168+yogeshg@...> Date: 2018-10-30T17:38:25Z move timer task to broader scope and use a currentBarrierStartTime commit 52063971b3879457db02365ed4bd8495161ce111 Author: Yogesh Garg <1059168+yogeshg@...> Date: 2018-10-31T06:00:36Z send timer to the companion object ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org