You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/04/15 02:25:25 UTC

[jira] [Commented] (BEAM-188) Merging WindowFn + GBK + Write => InvalidWindows throws UnsupportedOperationException

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

ASF GitHub Bot commented on BEAM-188:
-------------------------------------

GitHub user dhalperi opened a pull request:

    https://github.com/apache/incubator-beam/pull/181

    [BEAM-188] Write: apply GlobalWindows first

    And do not supply a timestamp when outputting.
    
    Note that this is safe because the functions in the Writer cannot access the window
    or timestamp. When we add per-Window or similar functions to the sinks, we will
    likely do so at a higher level.
    
    Also testing and improving the existing tests. Note that the session test did fail without the accompanying changes to Write.

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

    $ git pull https://github.com/dhalperi/incubator-beam write-global-windows

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

    https://github.com/apache/incubator-beam/pull/181.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 #181
    
----
commit 303e14d508a45c848bafb227944e8b8a4078efb0
Author: Dan Halperin <dh...@google.com>
Date:   2016-04-15T00:23:42Z

    [BEAM-188] Write: apply GlobalWindows first
    
    And do not supply a timestamp when outputting.
    
    Note that this is safe because the functions in the Writer cannot access the window
    or timestamp. When we add per-Window or similar functions to the sinks, we will
    likely do so at a higher level.

----


> Merging WindowFn + GBK + Write => InvalidWindows throws UnsupportedOperationException
> -------------------------------------------------------------------------------------
>
>                 Key: BEAM-188
>                 URL: https://issues.apache.org/jira/browse/BEAM-188
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Kenneth Knowles
>            Assignee: Daniel Halperin
>
> The {{Write}} transform performs {{outputWithTimestamp(..., Instant.now())}} in the {{finishBundle}} of one of the encapsulated {{ParDo}} transforms. This action causes the {{WindowFn}} to be invoked to assign a window to the output value. But a merging {{WindowFn}} such as {{Sessions}} will be replaced by {{InvalidWindows}} at the GBK where merging is performed, so this is destined to crash.
> It is almost certain that the window is not relevant, so we can quickly fix this by just windowing into the global window earlier and using vanilla {{output(...)}}.



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