beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kennknowles <...@git.apache.org>
Subject [GitHub] incubator-beam pull request #1309: [BEAM-941] Refactor DoFnSignatures & DoFn...
Date Tue, 08 Nov 2016 07:09:41 GMT
GitHub user kennknowles opened a pull request:

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

    [BEAM-941] Refactor DoFnSignatures & DoFnInvokers for clarity; removes public INSTANCE

    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](https://www.apache.org/licenses/icla.txt).
    
    ---
    
    R: @tgroh 
    
    As you requested for a followup on the `OnTimerInvoker` PR. The two commits are independent
but both address the same issue. This is an operation no-op (unless something went wrong).
    
     - For `DoFnSignatures` I decided there was only likely to ever be one canonical way to
create a `DoFnSignature, so it was merely a matter of changes one or two non-`static` methods
to `static`.
     - For the invokers, it is very easy to imagine experiments with different kinds of invokers,
so I made the factory interfaces explicit, as you suggested.
    
    BEAM-941 has a couple more longstanding occurrences that I did not address here:
    
    ```
    $ find . -name '*.java' | xargs grep 'public.*INSTANCE'
    ./sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/GlobalWindow.java:
 public static final GlobalWindow INSTANCE = new GlobalWindow();
    ./sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/GlobalWindow.java:
   public static final Coder INSTANCE = new Coder();
    ./sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/PaneInfo.java:
   public static final PaneInfoCoder INSTANCE = new PaneInfoCoder();
    ./sdks/java/core/src/test/java/org/apache/beam/sdk/testing/SystemNanoTimeSleeper.java:
 public static final Sleeper INSTANCE = new SystemNanoTimeSleeper();
    ```

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

    $ git pull https://github.com/kennknowles/incubator-beam INSTANCE

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

    https://github.com/apache/incubator-beam/pull/1309.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 #1309
    
----
commit 8cd4ec84b9350e1aa6ba35010fc134adc0d7606f
Author: Kenneth Knowles <klk@google.com>
Date:   2016-11-08T06:36:09Z

    Remove DoFnSignatures.INSTANCE

commit 6484bf7b1ceea7d9bcf32fa56c7539dbb06cae55
Author: Kenneth Knowles <klk@google.com>
Date:   2016-11-08T07:03:46Z

    Remove INSTANCE from DoFnInvokers and OnTimerInvokers

----


---
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.
---

Mime
View raw message