Annotation Type DoFn.RequiresTimeSortedInput


  • @Documented
    @Experimental
    @Retention(RUNTIME)
    @Target(METHOD)
    public static @interface DoFn.RequiresTimeSortedInput
    Experimental - no backwards compatibility guarantees. The exact name or usage of this feature may change.

    Annotation that may be added to a DoFn.ProcessElement method to indicate that the runner must ensure that the observable contents of the input PCollection is sorted by time, in ascending order. The time ordering is defined by element's timestamp, ordering of elements with equal timestamps is not defined.

    Note that this annotation makes sense only for stateful ParDos, because outcome of stateless functions cannot depend on the ordering.

    This annotation respects specified allowedLateness defined in WindowingStrategy. All data is emitted after input watermark passes element's timestamp + allowedLateness. Output watermark is hold, so that the emitted data is not emitted as late data.

    The ordering requirements implies that all data that arrives later than the allowed lateness will have to be dropped. This might change in the future with introduction of retractions.