beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (BEAM-854) ReifyTimestampAndWindows explodes windows
Date Fri, 28 Oct 2016 05:24:59 GMT


ASF GitHub Bot commented on BEAM-854:

GitHub user kennknowles opened a pull request:

    [BEAM-854] Directly implement ReifyTimestampsAndWindows in SparkRunner

    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
     - [x] Make sure the PR title is formatted like:
       `[BEAM-<Jira issue #>] Description of pull request`
     - [x] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [x] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [x] If this contribution is large, please file an Apache
           [Individual Contributor License Agreement](
    R: @amitsela 
    I introduced a performance issue in [BEAM-854](
that affects the SparkRunner and DirectRunner. As per discussion there, `ReifyTimestampsAndWindows`
can only use the multi-window `WindowedValue` representation if it is implemented as a primitive.
The fix is pretty trivial, and actually just simpler anyhow. I ran `mvn integration-test -Plocal-runnable-on-service-tests
-pl runners/spark` but feel free to pull this down and do it right if I have missed something,
inline the class, etc, whatever you like.

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

    $ git pull Spark-Reify

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

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1216
commit 72b634857bc660716a1ce5e8fa03b39138472652
Author: Kenneth Knowles <>
Date:   2016-10-28T05:18:19Z

    Directly implement ReifyTimestampsAndWindows in SparkRunner


> ReifyTimestampAndWindows explodes windows
> -----------------------------------------
>                 Key: BEAM-854
>                 URL:
>             Project: Beam
>          Issue Type: Bug
>            Reporter: Eugene Kirpichov
>            Assignee: Kenneth Knowles
> Commit
changed the fn from accessing the collection of windows to accessing the windows one-by-one,
which causes this DoFn to explode them, which (I suppose) hurts performance, since this Fn
is quite important: it's a part of GroupByKey in the Spark runner and Direct runner, part
of Splittable DoFn, part of GBKViaGBKO, and part of GatherAllPanes.
> I can see a couple of ways to fix this:
> - Make this be a primitive transform, with runner-specific support to keep the windows
> - Allow any DoFn to access the compressed representation explicitly using a Collection<BoundedWindow>
> I'm personally in favor of the latter because it automatically benefits all runners.

This message was sent by Atlassian JIRA

View raw message