Interface TwoInputNonBroadcastWindowStreamProcessFunction<IN1,IN2,OUT>
-
- Type Parameters:
IN1- The type of the input1 value.IN2- The type of the input2 value.OUT- The type of the output value.
- All Superinterfaces:
org.apache.flink.api.common.functions.Function,ProcessFunction,Serializable,WindowProcessFunction
@Experimental public interface TwoInputNonBroadcastWindowStreamProcessFunction<IN1,IN2,OUT> extends WindowProcessFunction
A type ofWindowProcessFunctionfor two input window processing, such as window-join.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidonClear(Collector<OUT> output, PartitionedContext<OUT> ctx, TwoInputWindowContext<IN1,IN2> windowContext)Callback when a window is about to be cleaned up.default voidonLateRecord1(IN1 record, Collector<OUT> output, PartitionedContext<OUT> ctx)This method will be invoked when a record is received from input1 after the window has been cleaned.default voidonLateRecord2(IN2 record, Collector<OUT> output, PartitionedContext<OUT> ctx)This method will be invoked when a record is received from input2 after the window has been cleaned.default voidonRecord1(IN1 record, Collector<OUT> output, PartitionedContext<OUT> ctx, TwoInputWindowContext<IN1,IN2> windowContext)This method will be invoked when a record is received from input1.default voidonRecord2(IN2 record, Collector<OUT> output, PartitionedContext<OUT> ctx, TwoInputWindowContext<IN1,IN2> windowContext)This method will be invoked when a record is received from input2.voidonTrigger(Collector<OUT> output, PartitionedContext<OUT> ctx, TwoInputWindowContext<IN1,IN2> windowContext)This method will be invoked when the Window is triggered, you can obtain all the input records in the Window byTwoInputWindowContext.getAllRecords1()andTwoInputWindowContext.getAllRecords2().-
Methods inherited from interface org.apache.flink.datastream.api.function.ProcessFunction
close, declareWatermarks, usesStates
-
Methods inherited from interface org.apache.flink.datastream.api.extension.window.function.WindowProcessFunction
useWindowStates
-
-
-
-
Method Detail
-
onRecord1
default void onRecord1(IN1 record, Collector<OUT> output, PartitionedContext<OUT> ctx, TwoInputWindowContext<IN1,IN2> windowContext) throws Exception
This method will be invoked when a record is received from input1. Its default behaviors to store data in built-in window state byTwoInputWindowContext.putRecord1(IN1). If the user overrides this method, they have to take care of the input data themselves.- Throws:
Exception
-
onRecord2
default void onRecord2(IN2 record, Collector<OUT> output, PartitionedContext<OUT> ctx, TwoInputWindowContext<IN1,IN2> windowContext) throws Exception
This method will be invoked when a record is received from input2. Its default behaviors to store data in built-in window state byTwoInputWindowContext.putRecord2(IN2). If the user overrides this method, they have to take care of the input data themselves.- Throws:
Exception
-
onTrigger
void onTrigger(Collector<OUT> output, PartitionedContext<OUT> ctx, TwoInputWindowContext<IN1,IN2> windowContext) throws Exception
This method will be invoked when the Window is triggered, you can obtain all the input records in the Window byTwoInputWindowContext.getAllRecords1()andTwoInputWindowContext.getAllRecords2().- Throws:
Exception
-
onClear
default void onClear(Collector<OUT> output, PartitionedContext<OUT> ctx, TwoInputWindowContext<IN1,IN2> windowContext) throws Exception
Callback when a window is about to be cleaned up. It is the time to deletes any state in thewindowContextwhen the Window expires (the event time or processing time passes itsmaxTimestamp+allowedLateness).- Throws:
Exception
-
onLateRecord1
default void onLateRecord1(IN1 record, Collector<OUT> output, PartitionedContext<OUT> ctx) throws Exception
This method will be invoked when a record is received from input1 after the window has been cleaned.- Throws:
Exception
-
-