public class TwoOutputProcessOperator<IN,OUT_MAIN,OUT_SIDE>
extends org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT_MAIN,org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT_MAIN,OUT_SIDE>>
implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<IN,OUT_MAIN>, org.apache.flink.streaming.api.operators.BoundedOneInput
TwoOutputStreamProcessFunction.
We support the second output via flink side-output mechanism.
| Modifier and Type | Class and Description |
|---|---|
protected class |
TwoOutputProcessOperator.SideOutputCollector
This is a special implementation of
TimestampCollector that using side-output
mechanism to emit data. |
| Modifier and Type | Field and Description |
|---|---|
protected DefaultRuntimeContext |
context |
protected TimestampCollector<OUT_MAIN> |
mainCollector |
protected org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT_MAIN,OUT_SIDE> |
nonPartitionedContext |
protected org.apache.flink.util.OutputTag<OUT_SIDE> |
outputTag |
protected DefaultPartitionedContext |
partitionedContext |
protected TimestampCollector<OUT_SIDE> |
sideCollector |
| Constructor and Description |
|---|
TwoOutputProcessOperator(org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT_MAIN,OUT_SIDE> userFunction,
org.apache.flink.util.OutputTag<OUT_SIDE> outputTag) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
currentKey() |
void |
endInput() |
protected TimestampCollector<OUT_MAIN> |
getMainCollector() |
protected org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT_MAIN,OUT_SIDE> |
getNonPartitionedContext() |
protected org.apache.flink.datastream.api.context.ProcessingTimeManager |
getProcessingTimeManager() |
TimestampCollector<OUT_SIDE> |
getSideCollector() |
void |
open() |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) |
close, finish, getUserFunction, getUserFunctionParameters, initializeState, notifyCheckpointAborted, notifyCheckpointComplete, setOutputType, setup, snapshotStategetChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, isUsingCustomRawKeyedState, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, snapshotState, useSplittableTimersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetKeyContextElementclose, finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotStatenotifyCheckpointAborted, notifyCheckpointCompletegetCurrentKey, setCurrentKeyprotected transient TimestampCollector<OUT_MAIN> mainCollector
protected transient TimestampCollector<OUT_SIDE> sideCollector
protected transient DefaultRuntimeContext context
protected transient DefaultPartitionedContext partitionedContext
protected transient org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT_MAIN,OUT_SIDE> nonPartitionedContext
protected org.apache.flink.util.OutputTag<OUT_SIDE> outputTag
public void open()
throws Exception
open in interface org.apache.flink.streaming.api.operators.StreamOperator<OUT_MAIN>open in class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT_MAIN,org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT_MAIN,OUT_SIDE>>Exceptionpublic void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) throws Exception
public void endInput()
throws Exception
endInput in interface org.apache.flink.streaming.api.operators.BoundedOneInputExceptionprotected TimestampCollector<OUT_MAIN> getMainCollector()
public TimestampCollector<OUT_SIDE> getSideCollector()
protected Object currentKey()
protected org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT_MAIN,OUT_SIDE> getNonPartitionedContext()
protected org.apache.flink.datastream.api.context.ProcessingTimeManager getProcessingTimeManager()
Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.