Class CoGroupedStreams.WithWindow<T1,T2,KEY,W extends Window>
- java.lang.Object
-
- org.apache.flink.streaming.api.datastream.CoGroupedStreams.WithWindow<T1,T2,KEY,W>
-
- Type Parameters:
T1
- Type of the elements from the first inputT2
- Type of the elements from the second inputKEY
- Type of the key. This must be the same for both inputsW
- Type ofWindow
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 hasKeySelectors
defined for both inputs as well as aWindowAssigner
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WithWindow(DataStream<T1> input1, DataStream<T2> input2, org.apache.flink.api.java.functions.KeySelector<T1,KEY> keySelector1, org.apache.flink.api.java.functions.KeySelector<T2,KEY> keySelector2, org.apache.flink.api.common.typeinfo.TypeInformation<KEY> keyType, WindowAssigner<? super org.apache.flink.util.TaggedUnion<T1,T2>,W> windowAssigner, Trigger<? super org.apache.flink.util.TaggedUnion<T1,T2>,? super W> trigger, Evictor<? super org.apache.flink.util.TaggedUnion<T1,T2>,? super W> evictor, Duration allowedLateness)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoGroupedStreams.WithWindow<T1,T2,KEY,W>
allowedLateness(Duration newLateness)
Sets the time by which elements are allowed to be late.<T> SingleOutputStreamOperator<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.<T> SingleOutputStreamOperator<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.CoGroupedStreams.WithWindow<T1,T2,KEY,W>
evictor(Evictor<? super org.apache.flink.util.TaggedUnion<T1,T2>,? super W> newEvictor)
Sets theEvictor
that should be used to evict elements from a window before emission.CoGroupedStreams.WithWindow<T1,T2,KEY,W>
trigger(Trigger<? super org.apache.flink.util.TaggedUnion<T1,T2>,? super W> newTrigger)
Sets theTrigger
that should be used to trigger window emission.
-
-
-
Constructor Detail
-
WithWindow
protected WithWindow(DataStream<T1> input1, DataStream<T2> input2, org.apache.flink.api.java.functions.KeySelector<T1,KEY> keySelector1, org.apache.flink.api.java.functions.KeySelector<T2,KEY> keySelector2, org.apache.flink.api.common.typeinfo.TypeInformation<KEY> keyType, WindowAssigner<? super org.apache.flink.util.TaggedUnion<T1,T2>,W> windowAssigner, Trigger<? super org.apache.flink.util.TaggedUnion<T1,T2>,? super W> trigger, Evictor<? super org.apache.flink.util.TaggedUnion<T1,T2>,? super W> evictor, @Nullable Duration allowedLateness)
-
-
Method Detail
-
trigger
@PublicEvolving public CoGroupedStreams.WithWindow<T1,T2,KEY,W> trigger(Trigger<? super org.apache.flink.util.TaggedUnion<T1,T2>,? super W> newTrigger)
Sets theTrigger
that should be used to trigger window emission.
-
evictor
@PublicEvolving public CoGroupedStreams.WithWindow<T1,T2,KEY,W> evictor(Evictor<? super org.apache.flink.util.TaggedUnion<T1,T2>,? super W> newEvictor)
Sets theEvictor
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.
-
allowedLateness
@PublicEvolving public CoGroupedStreams.WithWindow<T1,T2,KEY,W> allowedLateness(@Nullable Duration newLateness)
Sets the time by which elements are allowed to be late.- See Also:
WindowedStream.allowedLateness(Duration)
-
apply
public <T> SingleOutputStreamOperator<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.
-
apply
public <T> SingleOutputStreamOperator<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.
-
-