You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/04/05 12:00:18 UTC

[GitHub] [beam] steveniemitz commented on a diff in pull request #17262: [BEAM-14244] Use the supplied output timestamp for processing time timers rather than the input watermark

steveniemitz commented on code in PR #17262:
URL: https://github.com/apache/beam/pull/17262#discussion_r842700832


##########
runners/core-java/src/main/java/org/apache/beam/runners/core/SimpleDoFnRunner.java:
##########
@@ -209,7 +209,12 @@ public void processElement(WindowedValue<InputT> compressedElem) {
         break;
       case PROCESSING_TIME:
       case SYNCHRONIZED_PROCESSING_TIME:
-        effectiveTimestamp = stepContext.timerInternals().currentInputWatermarkTime();
+        Instant outputWatermark = stepContext.timerInternals().currentOutputWatermarkTime();
+        Instant inputWatermark = stepContext.timerInternals().currentInputWatermarkTime();
+        effectiveTimestamp =
+            outputTimestamp != null
+                ? outputTimestamp
+                : outputWatermark != null ? outputWatermark : inputWatermark;

Review Comment:
   This comment just seems out of date, you certainly can set the output timestamp for processing time timers.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org