Class TableKeyedAsyncWaitOperator<IN,OUT,KEY>
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
-
- org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,org.apache.flink.streaming.api.functions.async.AsyncFunction<IN,OUT>>
-
- org.apache.flink.table.runtime.operators.TableKeyedAsyncWaitOperator<IN,OUT,KEY>
-
- Type Parameters:
IN- Input type for the operator.OUT- Output type for the operator.KEY- Key type for the operator.
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.state.CheckpointListener,org.apache.flink.streaming.api.operators.BoundedOneInput,org.apache.flink.streaming.api.operators.Input<IN>,org.apache.flink.streaming.api.operators.KeyContext,org.apache.flink.streaming.api.operators.KeyContextHandler,org.apache.flink.streaming.api.operators.OneInputStreamOperator<IN,OUT>,org.apache.flink.streaming.api.operators.OutputTypeConfigurable<OUT>,org.apache.flink.streaming.api.operators.StreamOperator<OUT>,org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator,org.apache.flink.streaming.api.operators.UserFunctionProvider<org.apache.flink.streaming.api.functions.async.AsyncFunction<IN,OUT>>,org.apache.flink.streaming.api.operators.YieldingOperator<OUT>
public class TableKeyedAsyncWaitOperator<IN,OUT,KEY> extends org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,org.apache.flink.streaming.api.functions.async.AsyncFunction<IN,OUT>> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<IN,OUT>, org.apache.flink.streaming.api.operators.BoundedOneInputThis operator serves a similar purpose toAsyncWaitOperator. UnlikeAsyncWaitOperator, this operator supports key-ordered async processing.If the planner can infer the upsert key, then the order key used for processing will be the upsert key; otherwise, the entire row will be treated as the order key.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.flink.streaming.runtime.streamrecord.StreamElementSerializer<IN>inStreamElementSerializerTypeSerializerfor inputs while making snapshots.protected static org.slf4j.LoggerLOGprotected booleanneedDeepCopyprotected org.apache.flink.streaming.api.operators.TimestampedCollector<OUT>timestampedCollector
-
Constructor Summary
Constructors Constructor Description TableKeyedAsyncWaitOperator(org.apache.flink.streaming.api.functions.async.AsyncFunction<IN,OUT> asyncFunction, org.apache.flink.api.java.functions.KeySelector<IN,KEY> keySelector, long timeout, int capacity, org.apache.flink.streaming.runtime.tasks.ProcessingTimeService processingTimeService, org.apache.flink.api.common.operators.MailboxExecutor mailboxExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidemitWatermark(org.apache.flink.streaming.api.watermark.Watermark mark)voidendInput()TableAsyncExecutionController<IN,OUT,KEY>getAsyncExecutionController()KEYgetKey(AecRecord<IN,OUT> aecRecord)voidinitializeState(org.apache.flink.runtime.state.StateInitializationContext context)voidinvoke(AecRecord<IN,OUT> element)voidopen()voidprocessElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> record)voidprocessWatermark(org.apache.flink.streaming.api.watermark.Watermark mark)voidsetup(org.apache.flink.streaming.runtime.tasks.StreamTask<?,?> containingTask, org.apache.flink.streaming.api.graph.StreamConfig config, org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<OUT>> output)org.apache.flink.streaming.api.operators.OperatorSnapshotFuturessnapshotState(long checkpointId, long timestamp, org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions, org.apache.flink.runtime.state.CheckpointStreamFactory factory)voidwaitInFlightInputsFinished()-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator
close, finish, getUserFunction, getUserFunctionParameters, notifyCheckpointAborted, notifyCheckpointComplete, setOutputType, snapshotState
-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
beforeInitializeStateHandler, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, isAsyncKeyOrderedProcessingEnabled, isUsingCustomRawKeyedState, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark1, processWatermark1, processWatermark2, processWatermark2, processWatermarkStatus, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, useSplittableTimers
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.api.common.state.CheckpointListener
notifyCheckpointAborted, notifyCheckpointComplete
-
Methods inherited from interface org.apache.flink.streaming.api.operators.Input
processLatencyMarker, processRecordAttributes, processWatermark, processWatermarkStatus
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContext
getCurrentKey, setCurrentKey
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler
hasKeyContext
-
-
-
-
Field Detail
-
LOG
protected static final org.slf4j.Logger LOG
-
inStreamElementSerializer
protected transient org.apache.flink.streaming.runtime.streamrecord.StreamElementSerializer<IN> inStreamElementSerializer
TypeSerializerfor inputs while making snapshots.
-
timestampedCollector
protected transient org.apache.flink.streaming.api.operators.TimestampedCollector<OUT> timestampedCollector
-
needDeepCopy
protected transient boolean needDeepCopy
-
-
Constructor Detail
-
TableKeyedAsyncWaitOperator
public TableKeyedAsyncWaitOperator(org.apache.flink.streaming.api.functions.async.AsyncFunction<IN,OUT> asyncFunction, org.apache.flink.api.java.functions.KeySelector<IN,KEY> keySelector, long timeout, int capacity, org.apache.flink.streaming.runtime.tasks.ProcessingTimeService processingTimeService, org.apache.flink.api.common.operators.MailboxExecutor mailboxExecutor)
-
-
Method Detail
-
setup
public void setup(org.apache.flink.streaming.runtime.tasks.StreamTask<?,?> containingTask, org.apache.flink.streaming.api.graph.StreamConfig config, org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<OUT>> output)
-
initializeState
public void initializeState(org.apache.flink.runtime.state.StateInitializationContext context) throws Exception- Specified by:
initializeStatein interfaceorg.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator- Overrides:
initializeStatein classorg.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,org.apache.flink.streaming.api.functions.async.AsyncFunction<IN,OUT>>- Throws:
Exception
-
open
public void open() throws Exception
-
processElement
public void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> record) throws Exception
-
processWatermark
public void processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark) throws Exception
-
snapshotState
public org.apache.flink.streaming.api.operators.OperatorSnapshotFutures snapshotState(long checkpointId, long timestamp, org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions, org.apache.flink.runtime.state.CheckpointStreamFactory factory) throws Exception
-
endInput
public void endInput() throws Exception- Specified by:
endInputin interfaceorg.apache.flink.streaming.api.operators.BoundedOneInput- Throws:
Exception
-
emitWatermark
public void emitWatermark(org.apache.flink.streaming.api.watermark.Watermark mark)
-
waitInFlightInputsFinished
public void waitInFlightInputsFinished() throws InterruptedException- Throws:
InterruptedException
-
getAsyncExecutionController
@VisibleForTesting public TableAsyncExecutionController<IN,OUT,KEY> getAsyncExecutionController()
-
-