Package org.apache.beam.sdk.transforms
Annotation Interface DoFn.FinishBundle
Annotation for the method to use to finish processing a batch of elements. The method annotated
with this must satisfy the following constraints:
- If one of the parameters is of type
DoFn.FinishBundleContext, then it will be passed a context object for the current execution. - If one of the parameters is of type
PipelineOptions, then it will be passed the options for the current pipeline. - If one of the parameters is of type
DoFn.BundleFinalizer, then it will be passed a mechanism to register a callback that will be invoked after the runner successfully commits the output of this bundle. See Apache Beam Portability API: How to Finalize Bundles for further details. - TODO(https://github.com/apache/beam/issues/18203): Add support for an
DoFn.OutputReceiverandDoFn.MultiOutputReceiverthat can output to a window.
Note that @FinishBundle is invoked before the runner commits the output
while bundle finalizer callbacks are invoked after the runner
has committed the output of a successful bundle.