OutputTimeFn.DependsOnlyOnWindow (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1


Class OutputTimeFn.DependsOnlyOnWindow<W extends BoundedWindow>

    • Constructor Detail

      • DependsOnlyOnWindow

        protected DependsOnlyOnWindow()
    • Method Detail

      • assignOutputTime

        protected abstract Instant assignOutputTime(W window)
        Returns the output timestamp to use for data in the specified window.

        Note that the result of this method must be between the maximum possible input timestamp in window and window.maxTimestamp() (inclusive on both sides).

        For example, using Sessions.withGapDuration(gapDuration), we know that all input timestamps must lie at least gapDuration from the end of the session, so window.maxTimestamp() - gapDuration is an acceptable assigned timestamp.

        See Also:
        assignOutputTime(Instant, BoundedWindow)
      • combine

        public final Instant combine(Instant outputTimestamp,
                                     Instant otherOutputTimestamp)
        Combines the given output times, which must be from the same window, into an output time for a computed value.
        • combine must be commutative: combine(a, b).equals(combine(b, a)).
        • combine must be associative: combine(a, combine(b, c)).equals(combine(combine(a, b), c)).
        Specified by:
        combine in class OutputTimeFn<W extends BoundedWindow>
        the same timestamp as both argument timestamps, which are necessarily equal.
      • dependsOnlyOnEarliestInputTimestamp

        public final boolean dependsOnlyOnEarliestInputTimestamp()
        Returns true if the result of combination of many output timestamps actually depends only on the earliest.

        This may allow optimizations when it is very efficient to retrieve the earliest timestamp to be combined.

        Specified by:
        dependsOnlyOnEarliestInputTimestamp in class OutputTimeFn<W extends BoundedWindow>
        true. Since the output time depends only on the window, it can certainly be ascertained given a single input timestamp.
      • equals

        public boolean equals(Object other)
        equals in class Object
        true if the two OutputTimeFn instances have the same class, by default.
      • hashCode

        public int hashCode()
        hashCode in class Object

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Dataflow