IN
- The type of the input elements@Internal public class PythonTimestampsAndWatermarksOperator<IN> extends OneInputPythonFunctionOperator<IN,IN,org.apache.flink.types.Row,Long> implements org.apache.flink.streaming.runtime.tasks.ProcessingTimeCallback
These two responsibilities run in the same operator rather than in two different ones, because the implementation of the timestamp assigner and the watermark generator is frequently in the same class (and should be run in the same instance), even though the separate interfaces support the use of different classes.
Modifier and Type | Field and Description |
---|---|
static String |
STREAM_TIMESTAMP_AND_WATERMARK_OPERATOR_NAME |
bais, baisWrapper, baos, baosWrapper, collector, DATA_STREAM_STATELESS_FUNCTION_URN, jobOptions
elementCount, maxBundleSize, pythonFunctionRunner
Constructor and Description |
---|
PythonTimestampsAndWatermarksOperator(org.apache.flink.configuration.Configuration config,
org.apache.flink.api.common.typeinfo.TypeInformation<IN> inputTypeInfo,
DataStreamPythonFunctionInfo pythonFunctionInfo,
org.apache.flink.api.common.eventtime.WatermarkStrategy<IN> watermarkStrategy) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configureEmitProgressiveWatermarks(boolean emitProgressiveWatermarks) |
void |
emitResult(org.apache.flink.api.java.tuple.Tuple2<byte[],Integer> resultTuple)
Sends the execution result to the downstream operator.
|
String |
getCoderUrn() |
void |
onProcessingTime(long timestamp) |
void |
open() |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) |
void |
processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark) |
createPythonFunctionRunner, getFunctionUrn, getInternalParameters, getPythonEnv
endInput
checkInvokeFinishBundleByCount, createPythonEnvironmentManager, dispose, emitResults, getConfig, getFlinkMetricContainer, getPythonConfig, invokeFinishBundle, isBundleFinished, prepareSnapshotPreBarrier, setCurrentKey, setPythonConfig
getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setKeyContextElement
dispose, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
public static final String STREAM_TIMESTAMP_AND_WATERMARK_OPERATOR_NAME
public PythonTimestampsAndWatermarksOperator(org.apache.flink.configuration.Configuration config, org.apache.flink.api.common.typeinfo.TypeInformation<IN> inputTypeInfo, DataStreamPythonFunctionInfo pythonFunctionInfo, org.apache.flink.api.common.eventtime.WatermarkStrategy<IN> watermarkStrategy)
public void open() throws Exception
public void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) throws Exception
processElement
in interface org.apache.flink.streaming.api.operators.Input<IN>
processElement
in class OneInputPythonFunctionOperator<IN,IN,org.apache.flink.types.Row,Long>
Exception
public void emitResult(org.apache.flink.api.java.tuple.Tuple2<byte[],Integer> resultTuple) throws Exception
AbstractPythonFunctionOperator
emitResult
in class AbstractPythonFunctionOperator<IN>
Exception
public String getCoderUrn()
getCoderUrn
in class OneInputPythonFunctionOperator<IN,IN,org.apache.flink.types.Row,Long>
public void configureEmitProgressiveWatermarks(boolean emitProgressiveWatermarks)
public void onProcessingTime(long timestamp)
onProcessingTime
in interface org.apache.flink.streaming.runtime.tasks.ProcessingTimeCallback
public void processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark) throws Exception
processWatermark
in interface org.apache.flink.streaming.api.operators.Input<IN>
processWatermark
in class AbstractPythonFunctionOperator<IN>
Exception
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.