[ 
https://issues.apache.org/jira/browse/BEAM-3979?focusedWorklogId=94428&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-94428
 ]

ASF GitHub Bot logged work on BEAM-3979:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Apr/18 02:33
            Start Date: 24/Apr/18 02:33
    Worklog Time Spent: 10m 
      Work Description: reuvenlax commented on a change in pull request #4989: 
[BEAM-3979] Start completing the new DoFn vision: plumb context parameters into 
process functions.
URL: https://github.com/apache/beam/pull/4989#discussion_r183590326
 
 

 ##########
 File path: 
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/SplittableParDo.java
 ##########
 @@ -361,7 +362,18 @@ public void setup() {
     public void processElement(final ProcessContext c) {
       final InputT element = c.element().getKey();
       invoker.invokeSplitRestriction(
-          element, c.element().getValue(), part -> c.output(KV.of(element, 
part)));
+          element, c.element().getValue(), new OutputReceiver<RestrictionT>() {
+            @Override
+            public void output(RestrictionT part) {
+              c.output(KV.of(element, part));
+            }
+
+            @Override
+            public void outputWithTimestamp(RestrictionT part, Instant 
timestamp) {
+              c.outputWithTimestamp(KV.of(element, part), timestamp);
 
 Review comment:
   <!--thread_id:cc_183501107_t; 
commit:e7163d592d424a480ae9071c770022129d401905; resolved:1-->
   <!--section:context-quote-->
   > **jkff** wrote:
   > As a tie-breaker: the dynamic splitting API does not allow you to assign 
different timestamps to the restrictions, and neither should the static one.
   
   <!--section:body-->
   Done.

----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 94428)
    Time Spent: 2h 40m  (was: 2.5h)

> New DoFn should allow injecting of all parameters in ProcessContext
> -------------------------------------------------------------------
>
>                 Key: BEAM-3979
>                 URL: https://issues.apache.org/jira/browse/BEAM-3979
>             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: 2h 40m
>  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
(v7.6.3#76005)

Reply via email to