You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by aljoscha <gi...@git.apache.org> on 2016/11/03 15:09:25 UTC
[GitHub] flink pull request #2751: Window operator changes
GitHub user aljoscha opened a pull request:
https://github.com/apache/flink/pull/2751
Window operator changes
The changes are described in the commit message of each commit.
### [FLINK-4993] Don't Allow Trigger.onMerge() to return TriggerResult
Allowing Trigger.onMerge() to return a TriggerResult is not necessary
since an onMerge() call will always be followed by an onElement() call
when adding the element that caused the merging to the merged window.
Having this complicates the internal logic of the WindowOperator and
makes writing Triggers more confusing than it has to be.
### [FLINK-4994] Don't Clear Trigger State and Merging Window Set When Purging
Before, when a Trigger returns TriggerResult.PURGE from any of the
on*() methods the WindowOperator will clear all state of that window
(window contents, merging window set) and call Trigger.clear() so that the
Trigger can clean up its state/timers.
This was problematic in some cases. For example, with merging windows (session
windows) this means that a late-arriving element will not be put into the
session that was previously built up but will be put into a completely new
session that only contains this one element.
The new behaviour is this:
* Only clean window contents on PURGE
* Register cleanup timer for any window, don't delete this on PURGE
* When the cleanup timer fires: clean window state, clean merging window set, call Trigger.clear() to allow it to clean state/timers
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aljoscha/flink window-operator-changes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/2751.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 #2751
----
commit ebd515ff18b93429b3cba714b0413170748d035b
Author: Aljoscha Krettek <al...@gmail.com>
Date: 2016-11-02T10:06:01Z
[FLINK-4993] Don't Allow Trigger.onMerge() to return TriggerResult
Allowing Trigger.onMerge() to return a TriggerResult is not necessary
since an onMerge() call will always be followed by an onElement() call
when adding the element that caused the merging to the merged window.
Having this complicates the internal logic of the WindowOperator and
makes writing Triggers more confusing than it has to be.
commit 1f9fd1fb1e9c8ef85e7782669e45f620e3dace31
Author: Aljoscha Krettek <al...@gmail.com>
Date: 2016-11-02T10:51:07Z
[FLINK-4994] Don't Clear Trigger State and Merging Window Set When Purging
Before, when a Trigger returns TriggerResult.PURGE from any of the
on*() methods the WindowOperator will clear all state of that window
(window contents, merging window set) and call Trigger.clear() so that the
Trigger can clean up its state/timers.
This was problematic in some cases. For example, with merging windows (session
windows) this means that a late-arriving element will not be put into the
session that was previously built up but will be put into a completely new
session that only contains this one element.
The new behaviour is this:
* Only clean window contents on PURGE
* Register cleanup timer for any window, don't delete this on PURGE
* When the cleanup timer fires: clean window state, clean merging window set,
call Trigger.clear() to allow it to clean state/timers
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2751: Window operator changes
Posted by aljoscha <gi...@git.apache.org>.
Github user aljoscha closed the pull request at:
https://github.com/apache/flink/pull/2751
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2751: Window operator changes
Posted by aljoscha <gi...@git.apache.org>.
Github user aljoscha commented on the issue:
https://github.com/apache/flink/pull/2751
Closing in favour of more fine grained PRs.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---