GitHub user NicoK opened a pull request: https://github.com/apache/flink/pull/5790
[FLINK-9107][docs] document timer coalescing for ProcessFunction ## What is the purpose of the change In a ProcessFunction, registering timers for each event via `ctx.timerService().registerEventTimeTimer()` using timestamps like `ctx.timestamp() + timeout` will get a millisecond accuracy and may thus create one timer per millisecond which may lead to some overhead in the `TimerService`. This problem can be mitigated by using timer coalescing if the desired accuracy of the timer can be larger than 1ms. A timer firing at full seconds only, for example, can be realised like this: ``` long coalescedTime = ((ctx.timestamp() + timeout) / 1000) * 1000; ctx.timerService().registerEventTimeTimer(coalescedTime); ``` As a result, only a single timer may exist for every second since we do not add timers for timestamps that are already there. Please note that this PR includes #5788 and should also be merged into 1.3 and 1.4 docs to which it applies as well. ## Brief change log - document timer coalescing for `ProcessFunction` You can merge this pull request into a Git repository by running: $ git pull https://github.com/NicoK/flink flink-9107 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/5790.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 #5790 ---- commit b6258697aabb8688aac19b5b228ddf8926e518f3 Author: Nico Kruber <nico@...> Date: 2018-03-29T13:55:47Z [FLINK-9110][docs] fix local bundler installation commit 540485a5620f6dcdd98e751a086076fb80997f65 Author: Nico Kruber <nico@...> Date: 2018-03-29T13:56:23Z [hotfix][docs] remove duplicate bundle installation commit f8274cf3ba06af19a4ac31e784803723e449336a Author: Nico Kruber <nico@...> Date: 2018-03-29T14:20:00Z [FLINK-9107][docs] document timer coalescing for ProcessFunction ---- ---