Class AbstractAsyncRunnableStreamOperator<OUT>
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
-
- org.apache.flink.runtime.asyncprocessing.operators.AbstractAsyncKeyOrderedStreamOperator<OUT>
-
- org.apache.flink.runtime.asyncprocessing.operators.AbstractAsyncRunnableStreamOperator<OUT>
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.state.CheckpointListener,KeyContext,KeyContextHandler,StreamOperator<OUT>,StreamOperatorStateHandler.CheckpointedStreamOperator,YieldingOperator<OUT>,AsyncKeyOrderedProcessing,AsyncKeyOrderedProcessingOperator
@Internal public abstract class AbstractAsyncRunnableStreamOperator<OUT> extends AbstractAsyncKeyOrderedStreamOperator<OUT> implements AsyncKeyOrderedProcessingOperator
This operator is an abstract class that give theAbstractStreamOperatorthe ability to performAsyncKeyOrderedProcessing. Note that this operator is not under keyed context, but providing key selectors for the async processing.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.asyncprocessing.operators.AbstractAsyncKeyOrderedStreamOperator
asyncExecutionController, currentProcessingContext, declarationManager, environment
-
Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
combinedWatermark, config, lastRecordAttributes1, lastRecordAttributes2, latencyStats, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
-
-
Constructor Summary
Constructors Constructor Description AbstractAsyncRunnableStreamOperator(org.apache.flink.api.java.functions.KeySelector<?,?> keySelector1, org.apache.flink.api.java.functions.KeySelector<?,?> keySelector2, ExecutorService asyncThreadPool, int asyncBufferSize, long asyncBufferTimeout, int inFlightRecordsLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <RET> org.apache.flink.core.asyncprocessing.AsyncFuture<RET>asyncProcess(org.apache.flink.util.function.CheckedSupplier<RET> runnable)protected AsyncExecutionControllercreateAsyncExecutionController()Create a newAsyncExecutionControllerfor the operator.protected EpochManager.ParallelModegetEpochParallelMode()Define the parallel mode of the epoch manager.protected org.apache.flink.api.java.functions.KeySelectorgetKeySelectorForAsyncKeyedContext(int index)Get theKeySelectorfor the given input index.-
Methods inherited from class org.apache.flink.runtime.asyncprocessing.operators.AbstractAsyncKeyOrderedStreamOperator
asyncProcessWithKey, beforeInitializeStateHandler, close, drainStateRequests, finish, getAsyncKeyedStateBackend, getCurrentKey, getDeclarationManager, getElementOrder, getInternalTimerService, getOrCreateKeyedState, getRecordProcessor, handleAsyncException, isAsyncKeyOrderedProcessingEnabled, newKeySelected, postProcessElement, postProcessWatermark, prepareSnapshotPreBarrier, preProcessWatermark, preserveRecordOrderAndProcess, processNonRecord, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark, processWatermark1, processWatermark1Internal, processWatermark2, processWatermark2Internal, processWatermarkInternal, processWatermarkStatus, processWatermarkStatus, reportOrForwardLatencyMarker, setAsyncKeyedContextElement, setKeyContextElement1, setKeyContextElement2
-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
getContainingTask, getExecutionConfig, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, open, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, processWatermarkStatus1, processWatermarkStatus2, setCurrentKey, setMailboxExecutor, setProcessingTimeService, setup, snapshotState, snapshotState, 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.streaming.runtime.operators.asyncprocessing.AsyncKeyOrderedProcessing
getRecordProcessor, isAsyncKeyOrderedProcessingEnabled
-
Methods inherited from interface org.apache.flink.streaming.runtime.operators.asyncprocessing.AsyncKeyOrderedProcessingOperator
asyncProcessWithKey, getDeclarationManager, getElementOrder, postProcessElement, preserveRecordOrderAndProcess, setAsyncKeyedContextElement
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler
hasKeyContext
-
Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator
getOperatorAttributes
-
-
-
-
Constructor Detail
-
AbstractAsyncRunnableStreamOperator
public AbstractAsyncRunnableStreamOperator(org.apache.flink.api.java.functions.KeySelector<?,?> keySelector1, org.apache.flink.api.java.functions.KeySelector<?,?> keySelector2, ExecutorService asyncThreadPool, int asyncBufferSize, long asyncBufferTimeout, int inFlightRecordsLimit)
-
-
Method Detail
-
getKeySelectorForAsyncKeyedContext
protected org.apache.flink.api.java.functions.KeySelector getKeySelectorForAsyncKeyedContext(int index)
Description copied from class:AbstractAsyncKeyOrderedStreamOperatorGet theKeySelectorfor the given input index. TheKeySelectoris used to extract the key from the element being processed, used in key ordered processing.- Specified by:
getKeySelectorForAsyncKeyedContextin classAbstractAsyncKeyOrderedStreamOperator<OUT>- Parameters:
index- the input index, start from 1.
-
createAsyncExecutionController
protected AsyncExecutionController createAsyncExecutionController()
Description copied from class:AbstractAsyncKeyOrderedStreamOperatorCreate a newAsyncExecutionControllerfor the operator.- Specified by:
createAsyncExecutionControllerin classAbstractAsyncKeyOrderedStreamOperator<OUT>
-
getEpochParallelMode
protected EpochManager.ParallelMode getEpochParallelMode()
Define the parallel mode of the epoch manager. The default isEpochManager.ParallelMode.SERIAL_BETWEEN_EPOCH. Subclasses can override this method to change the parallel mode.
-
asyncProcess
protected <RET> org.apache.flink.core.asyncprocessing.AsyncFuture<RET> asyncProcess(org.apache.flink.util.function.CheckedSupplier<RET> runnable)
-
-