Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

3) Introduce attributes to the operator to let Flink know if the operator only outputs results when the input has ended. All the operators defined in Flink should set the attributes accordingly to achieve the benefit above. For userUser-defined operators , it should be able to set the attributes accordingly so that it they can achieve the benefit.


Public Interfaces

1) Add the EndOfStreamTrigger createWithEndOfStreamTrigger method in GlobalWindows which allows users of the DataStream API to create GlobalWindows with EndOfStreamTrigger to specify whether the computation (e.g. co-group, aggregate) should emit data only after end-of-inputa window trigger that only fires when the input ends.

Code Block
languagejava
@PublicEvolving
public class GlobalWindows extends WindowAssigner<Object, GlobalWindow> {
   ···       
	/**
     * Creates a new {@link WindowAssigner} with {@link NeverTrigger} that assigns all elements to
     * the same {@link GlobalWindow}. The window is only useful if you also specify a custom
     * trigger. Otherwise, the window will never be triggered and no computation will be performed.
     *
     * @return The global window policy with {@link NeverTrigger} as default trigger.
     */
    public static GlobalWindows create() {
        ...
    }

    /**
     * Creates a new {@link WindowAssigner} with {@link EndOfStreamTrigger} that assigns all
     * elements to the same {@link GlobalWindow} and the default trigger fires if and only if the
     * input stream is ended.
     *
     * @return The global window policy with {@link EndOfStreamTrigger} as default trigger.
     */
    public static GlobalWindows createWithEndOfStreamTrigger() {
        ...
    }

 }

...