arunpandianp commented on code in PR #37574:
URL: https://github.com/apache/beam/pull/37574#discussion_r3240522476
##########
runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/TriggerStateMachineRunner.java:
##########
@@ -99,6 +101,16 @@ public boolean isClosed(StateAccessor<?> state) {
return
readFinishedBits(state.access(FINISHED_BITS_TAG)).isFinished(rootTrigger);
}
+ /** Return true if the window is new (no trigger state has ever been
persisted). */
+ public boolean isNew(StateAccessor<?> state) {
+ return isFinishedSetNeeded() && state.access(FINISHED_BITS_TAG).read() ==
null;
+ }
+
+ @VisibleForTesting
+ public BitSet getFinishedBits(StateAccessor<?> state) {
+ return readFinishedBits(state.access(FINISHED_BITS_TAG)).getBitSet();
+ }
+
public void prefetchIsClosed(StateAccessor<?> state) {
Review Comment:
Done.
--
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]