Interface TwoOutputStreamProcessFunction<IN,OUT1,OUT2>
-
- All Superinterfaces:
org.apache.flink.api.common.functions.Function,ProcessFunction,Serializable
@Experimental public interface TwoOutputStreamProcessFunction<IN,OUT1,OUT2> extends ProcessFunction
This contains all logical related to process and emit records to two output streams.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidendInput(TwoOutputNonPartitionedContext<OUT1,OUT2> ctx)This is a life-cycle method indicates that this function will no longer receive any input data.default voidonProcessingTimer(long timestamp, Collector<OUT1> output1, Collector<OUT2> output2, PartitionedContext ctx)Callback for processing timer.voidprocessRecord(IN record, Collector<OUT1> output1, Collector<OUT2> output2, PartitionedContext ctx)Process and emit record to the first/second output throughCollectors.-
Methods inherited from interface org.apache.flink.datastream.api.function.ProcessFunction
close, open, usesStates
-
-
-
-
Method Detail
-
processRecord
void processRecord(IN record, Collector<OUT1> output1, Collector<OUT2> output2, PartitionedContext ctx) throws Exception
Process and emit record to the first/second output throughCollectors.- Parameters:
record- to process.output1- to emit processed records to the first output.output2- to emit processed records to the second output.ctx- runtime context in which this function is executed.- Throws:
Exception
-
endInput
default void endInput(TwoOutputNonPartitionedContext<OUT1,OUT2> ctx)
This is a life-cycle method indicates that this function will no longer receive any input data.- Parameters:
ctx- the context in which this function is executed.
-
onProcessingTimer
default void onProcessingTimer(long timestamp, Collector<OUT1> output1, Collector<OUT2> output2, PartitionedContext ctx)Callback for processing timer.- Parameters:
timestamp- when this callback is triggered.output1- to emit record.output2- to emit record.ctx- runtime context in which this function is executed.
-
-