beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Work logged] (BEAM-3979) New DoFn should allow injecting of all parameters in ProcessContext
Date Tue, 24 Apr 2018 22:52:00 GMT


ASF GitHub Bot logged work on BEAM-3979:

                Author: ASF GitHub Bot
            Created on: 24/Apr/18 22:51
            Start Date: 24/Apr/18 22:51
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on a change in pull request #4989: [BEAM-3979]
Start completing the new DoFn vision: plumb context parameters into process functions.

 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/
 @@ -654,6 +687,41 @@ public Void dispatch(DoFnSignature.Parameter.WindowParameter p) {
               return null;
+            @Override
+            @Nullable
+            public Void dispatch(DoFnSignature.Parameter.ElementParameter p) {
+              return null;
 Review comment:
   I don't think any of these should be null or nullable, but should throw.
   They are also totally not necessary, since `WithDefault` means you don't have to override
any case you are not interested in.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 94835)

> New DoFn should allow injecting of all parameters in ProcessContext
> -------------------------------------------------------------------
>                 Key: BEAM-3979
>                 URL:
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>    Affects Versions: 2.4.0
>            Reporter: Reuven Lax
>            Assignee: Reuven Lax
>            Priority: Major
>             Fix For: 2.5.0
>          Time Spent: 3h
>  Remaining Estimate: 0h
> This was intended in the past, but never completed. Ideally all primitive parameters
in ProcessContext should be injectable, and OutputReceiver parameters can be used to collection
output. So, we should be able to write a DoFn as follows
> @ProcessElement
> public void process(@Element String word, OutputReceiver<String> receiver) {
>   receiver.output(word.toUpperCase());
> }

This message was sent by Atlassian JIRA

View raw message