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

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

                Author: ASF GitHub Bot
            Created on: 15/Nov/18 18:37
            Start Date: 15/Nov/18 18:37
    Worklog Time Spent: 10m 
      Work Description: swegner commented on a change in pull request #6969: 
[BEAM-2939] SplittableDoFn Java SDK API Changes
URL: https://github.com/apache/beam/pull/6969#discussion_r233943111
 
 

 ##########
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java
 ##########
 @@ -838,4 +872,40 @@ public final void prepareForProcessing() {}
    */
   @Override
   public void populateDisplayData(DisplayData.Builder builder) {}
+
+  /**
+   * A parameter that is accessible during {@link StartBundle @StartBundle}, 
{@link
+   * ProcessElement @ProcessElement} and {@link FinishBundle @FinishBundle} 
that allows the caller
+   * to register a callback that will be invoked after the bundle has been 
successfully completed
+   * and the runner has commit the output.
+   */
+  @Experimental(Kind.SPLITTABLE_DO_FN)
+  public interface BundleFinalizer {
+    /**
+     * The provided function will be called once the runner successfully 
commits the output of a
+     * bundle. Throwing during finalization represents that bundle 
finalization may have failed and
+     * this finalization will be discarded. The provided duration controls how 
long the finalization
+     * is valid for before it is garbage collected and will never be called.
 
 Review comment:
   > [..] controls how long the finalization is valid for before it is garbage 
collected and will never be called.
   
   This makes it sound like the duration limit applies to the finalization 
result, rather than the lifespan of the callback itself. Here's an attempt at 
making it more clear:
   
   > The provided callback will be invoked after the runner successfully 
commits the output of a bundle, as long as committing completes before the 
specified `finalizationDelayLimit`. Otherwise, the specified callback will be 
garbage collected and never invoked.
   > 
   > Throwing an exception from the finalization callback will cause the bundle 
to be marked failed. Runners may schedule the bundle to be retried.

----------------------------------------------------------------
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:
[email protected]


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

    Worklog Id:     (was: 166576)

> Fn API streaming 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: 6h
>  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
(v7.6.3#76005)

Reply via email to