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

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

                Author: ASF GitHub Bot
            Created on: 26/Feb/20 23:28
            Start Date: 26/Feb/20 23:28
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on pull request #10897: [BEAM-2939] 
Java UnboundedSource SDF wrapper
URL: https://github.com/apache/beam/pull/10897#discussion_r384793593
 
 

 ##########
 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/Read.java
 ##########
 @@ -375,4 +422,361 @@ public void checkDone() throws IllegalStateException {
       }
     }
   }
+
+  /**
+   * A splittable {@link DoFn} which executes an {@link UnboundedSource}.
+   *
+   * <p>We model the element as the original source and the restriction as a 
pair of the sub-source
+   * and its {@link CheckpointMark}. This allows us to split the sub-source 
over and over as long as
+   * the checkpoint mark is {@code null} or the {@link NoopCheckpointMark} 
since it does not
+   * maintain any state.
+   */
+  // TODO: Support reporting the watermark, currently the watermark never 
advances.
+  @UnboundedPerElement
+  static class UnboundedSourceAsSDFWrapperFn<OutputT, CheckpointT extends 
CheckpointMark>
+      extends DoFn<UnboundedSource<OutputT, CheckpointT>, 
ValueWithRecordId<OutputT>> {
+
+    private static final int DEFAULT_DESIRED_NUM_SPLITS = 20;
 
 Review comment:
   It seems the risk is higher setting this too low than too high--maybe 100 or 
more? (Is there a JIRA for letting the runner pass this in?)
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 393837)
    Time Spent: 20h 40m  (was: 20.5h)

> Fn API SDF support
> ------------------
>
>                 Key: BEAM-2939
>                 URL: https://issues.apache.org/jira/browse/BEAM-2939
>             Project: Beam
>          Issue Type: Improvement
>          Components: beam-model
>            Reporter: Henning Rohde
>            Assignee: Luke Cwik
>            Priority: Major
>              Labels: portability
>          Time Spent: 20h 40m
>  Remaining Estimate: 0h
>
> The Fn API should support streaming SDF. Detailed design TBD.
> Once design is ready, expand subtasks similarly to BEAM-2822.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to