Abacn commented on code in PR #29616:
URL: https://github.com/apache/beam/pull/29616#discussion_r1476812617
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java:
##########
@@ -185,6 +186,31 @@ public abstract class WindowedContext {
*/
public abstract void outputWithTimestamp(OutputT output, Instant
timestamp);
+ /**
+ * Adds the given element to the main output {@code PCollection}, with the
given windowing
+ * metadata.
+ *
+ * <p>Once passed to {@code outputWindowedValue} the element should not be
modified in any way.
+ *
+ * <p>If invoked from {@link ProcessElement}), the timestamp must not be
older than the input
+ * element's timestamp minus {@link DoFn#getAllowedTimestampSkew}. The
output element will be in
+ * the same windows as the input element.
+ *
+ * <p>If invoked from {@link StartBundle} or {@link FinishBundle}, this
will attempt to use the
+ * {@link org.apache.beam.sdk.transforms.windowing.WindowFn} of the input
{@code PCollection} to
+ * determine what windows the element should be in, throwing an exception
if the {@code
+ * WindowFn} attempts to access any information about the input element
except for the
+ * timestamp.
+ *
+ * <p><i>Note:</i> A splittable {@link DoFn} is not allowed to output from
{@link StartBundle}
+ * or {@link FinishBundle} methods.
+ */
+ public abstract void outputWindowedValue(
Review Comment:
This new abstract method introduces a breaking change in Beam 2.54.0 for
classes implemented OutputReceiver
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]