You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/12/16 14:14:46 UTC

[jira] [Commented] (FLINK-3174) Add merging WindowAssigner

    [ https://issues.apache.org/jira/browse/FLINK-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15059956#comment-15059956 ] 

ASF GitHub Bot commented on FLINK-3174:
---------------------------------------

GitHub user aljoscha opened a pull request:

    https://github.com/apache/flink/pull/1460

    [FLINK-3174] Add merging WindowAssigner

    After triggering and before emitting the window contents the window
    assigner is given the change to merge existing windows. The trigger is
    then given a chance to react in the new Trigger.onMerge() call.
    
    This adds new method WindowAssigner.isMerging() that allows window
    assigners to specify whether they can merge windows. All existing
    assigners are now derived from NonMergingWindowAssigner that returns
    false for isMerging(). Only of a WindowAssigners announces that it can
    merge is the more costly merging logic used in the WindowOperator.
    
    For triggers there is new method Trigger.onMerge() that notifies the
    trigger of the new merged window as well as the old windows and old
    trigger contexts. This allows the trigger to set a timer for the newly
    merged window.
    
    This enables proper support for session windows.
    
    This also adds the SessionWindows window assigner and adapts an existing
    session example and adds test cases.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aljoscha/flink window-sessions

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1460.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 #1460
    
----
commit dd87f6bc6ecc70d5ee2850ba0a954efdfda74db2
Author: Aljoscha Krettek <al...@gmail.com>
Date:   2015-12-15T16:37:48Z

    [FLINK-3174] Add merging WindowAssigner
    
    After triggering and before emitting the window contents the window
    assigner is given the change to merge existing windows. The trigger is
    then given a chance to react in the new Trigger.onMerge() call.
    
    This adds new method WindowAssigner.isMerging() that allows window
    assigners to specify whether they can merge windows. All existing
    assigners are now derived from NonMergingWindowAssigner that returns
    false for isMerging(). Only of a WindowAssigners announces that it can
    merge is the more costly merging logic used in the WindowOperator.
    
    For triggers there is new method Trigger.onMerge() that notifies the
    trigger of the new merged window as well as the old windows and old
    trigger contexts. This allows the trigger to set a timer for the newly
    merged window.
    
    This enables proper support for session windows.
    
    This also adds the SessionWindows window assigner and adapts an existing
    session example and adds test cases.

----


> Add merging WindowAssigner
> --------------------------
>
>                 Key: FLINK-3174
>                 URL: https://issues.apache.org/jira/browse/FLINK-3174
>             Project: Flink
>          Issue Type: Improvement
>          Components: Streaming
>            Reporter: Aljoscha Krettek
>            Assignee: Aljoscha Krettek
>             Fix For: 1.0.0
>
>
> We should add the possibility for WindowAssigners to merge windows. This will enable Session windowing support, similar to how Google Cloud Dataflow supports.
> For session windows, each element would initially be assigned to its own window. When triggering we check the windows and see if any can be merged. This way, elements with overlapping session windows merge into one session.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)