Class CoGroupedStreams.WithWindow<T1,​T2,​KEY,​W extends Window>

  • Type Parameters:
    T1 - Type of the elements from the first input
    T2 - Type of the elements from the second input
    KEY - Type of the key. This must be the same for both inputs
    W - Type of Window on which the co-group operation works.
    Enclosing class:
    CoGroupedStreams<T1,​T2>

    @Public
    public static class CoGroupedStreams.WithWindow<T1,​T2,​KEY,​W extends Window>
    extends Object
    A co-group operation that has KeySelectors defined for both inputs as well as a WindowAssigner.
    • Method Detail

      • evictor

        @PublicEvolving
        public CoGroupedStreams.WithWindow<T1,​T2,​KEY,​W> evictor​(Evictor<? super CoGroupedStreams.TaggedUnion<T1,​T2>,​? super W> newEvictor)
        Sets the Evictor that should be used to evict elements from a window before emission.

        Note: When using an evictor window performance will degrade significantly, since pre-aggregation of window results cannot be used.

      • apply

        public <T> DataStream<T> apply​(org.apache.flink.api.common.functions.CoGroupFunction<T1,​T2,​T> function)
        Completes the co-group operation with the user function that is executed for windowed groups.

        Note: This method's return type does not support setting an operator-specific parallelism. Due to binary backwards compatibility, this cannot be altered. Use the with(CoGroupFunction) method to set an operator-specific parallelism.

      • with

        @PublicEvolving
        @Deprecated
        public <T> SingleOutputStreamOperator<T> with​(org.apache.flink.api.common.functions.CoGroupFunction<T1,​T2,​T> function)
        Deprecated.
        This method will be removed once the apply(CoGroupFunction) method is fixed in the next major version of Flink (2.0).
        Completes the co-group operation with the user function that is executed for windowed groups.

        Note: This is a temporary workaround while the apply(CoGroupFunction) method has the wrong return type and hence does not allow one to set an operator-specific parallelism

      • apply

        public <T> DataStream<T> apply​(org.apache.flink.api.common.functions.CoGroupFunction<T1,​T2,​T> function,
                                       org.apache.flink.api.common.typeinfo.TypeInformation<T> resultType)
        Completes the co-group operation with the user function that is executed for windowed groups.

        Note: This method's return type does not support setting an operator-specific parallelism. Due to binary backwards compatibility, this cannot be altered. Use the with(CoGroupFunction, TypeInformation) method to set an operator-specific parallelism.

      • with

        @PublicEvolving
        @Deprecated
        public <T> SingleOutputStreamOperator<T> with​(org.apache.flink.api.common.functions.CoGroupFunction<T1,​T2,​T> function,
                                                      org.apache.flink.api.common.typeinfo.TypeInformation<T> resultType)
        Deprecated.
        This method will be removed once the apply(CoGroupFunction, TypeInformation) method is fixed in the next major version of Flink (2.0).
        Completes the co-group operation with the user function that is executed for windowed groups.

        Note: This is a temporary workaround while the apply(CoGroupFunction, TypeInformation) method has the wrong return type and hence does not allow one to set an operator-specific parallelism