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/13 22:42:53 UTC

[GitHub] [beam] reuvenlax commented on a diff in pull request #17359: [BEAM-14303] Add a way to exclude output timestamp watermark holds

reuvenlax commented on code in PR #17359:
URL: https://github.com/apache/beam/pull/17359#discussion_r849952642


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/state/Timer.java:
##########
@@ -99,6 +99,12 @@ public interface Timer {
    */
   Timer withOutputTimestamp(Instant outputTime);
 
+  /**
+   * Asserts that there is no output timestamp. The output watermark will not be held up, and it is
+   * illegal to output messages from this timer.

Review Comment:
   To be precise, illegal to output messages using the default timestamp (outputWithTimestamp is still allowed). 



##########
runners/core-java/src/main/java/org/apache/beam/runners/core/SimpleDoFnRunner.java:
##########
@@ -1251,7 +1262,7 @@ private void setAndVerifyOutputTimestamp() {
                       : PeriodFormat.getDefault().print(fn.getAllowedTimestampSkew().toPeriod()),
                   BoundedWindow.TIMESTAMP_MAX_VALUE));
         }
-      } else if (TimeDomain.EVENT_TIME.equals(spec.getTimeDomain())) {
+      } else if (!noOutputTimestamp && TimeDomain.EVENT_TIME.equals(spec.getTimeDomain())) {

Review Comment:
   This was a bug - good catch.



-- 
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