@Internal public class EmbeddedPythonWindowOperator<K,IN,OUT,W extends Window> extends AbstractOneInputEmbeddedPythonFunctionOperator<IN,OUT> implements Triggerable<K,W>
EmbeddedPythonWindowOperator
is responsible for executing user defined python
ProcessWindowFunction in embedded Python environment.timestamp
collector, hasSideOutput, outputTypeInfo, sideOutputContext
interpreter
bundleFinishedCallback, config, elementCount, lastFinishBundleTime, maxBundleSize, systemEnvEnabled
chainingStrategy, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
Constructor and Description |
---|
EmbeddedPythonWindowOperator(Configuration config,
DataStreamPythonFunctionInfo pythonFunctionInfo,
TypeInformation<IN> inputTypeInfo,
TypeInformation<OUT> outputTypeInfo,
TypeSerializer<W> windowSerializer) |
Modifier and Type | Method and Description |
---|---|
<T> DataStreamPythonFunctionOperator<T> |
copy(DataStreamPythonFunctionInfo pythonFunctionInfo,
TypeInformation<T> outputTypeInfo)
Make a copy of the DataStreamPythonFunctionOperator with the given pythonFunctionInfo and
outputTypeInfo.
|
List<FlinkFnApi.UserDefinedDataStreamFunction> |
createUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined functions to be executed.
|
Object |
getFunctionContext()
Gets The function context.
|
Object |
getTimerContext()
Gets The Timer context.
|
void |
onEventTime(InternalTimer<K,W> timer)
Invoked when an event-time timer fires.
|
void |
onProcessingTime(InternalTimer<K,W> timer)
Invoked when a processing-time timer fires.
|
void |
open()
This method is called immediately before any elements are processed, it should contain the
operator's initialization logic, e.g. state initialization.
|
endInput, openPythonInterpreter, processElement
addSideOutputTags, getJobParameters, getProducedType, getPythonFunctionInfo, getSideOutputTags, setNumPartitions
close, createPythonEnvironmentManager, invokeFinishBundle
checkInvokeFinishBundleByCount, finish, getConfiguration, getFlinkMetricContainer, isBundleFinished, prepareSnapshotPreBarrier, processWatermark, setCurrentKey
getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, setup, snapshotState, snapshotState, useSplittableTimers
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setKeyContextElement
close, finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
getCurrentKey, setCurrentKey
processLatencyMarker, processRecordAttributes, processWatermark, processWatermarkStatus
hasKeyContext
public EmbeddedPythonWindowOperator(Configuration config, DataStreamPythonFunctionInfo pythonFunctionInfo, TypeInformation<IN> inputTypeInfo, TypeInformation<OUT> outputTypeInfo, TypeSerializer<W> windowSerializer)
public void open() throws Exception
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<OUT>
open
in class AbstractOneInputEmbeddedPythonFunctionOperator<IN,OUT>
Exception
- An exception in this method causes the operator to fail.public List<FlinkFnApi.UserDefinedDataStreamFunction> createUserDefinedFunctionsProto()
AbstractOneInputEmbeddedPythonFunctionOperator
createUserDefinedFunctionsProto
in class AbstractOneInputEmbeddedPythonFunctionOperator<IN,OUT>
public void onEventTime(InternalTimer<K,W> timer) throws Exception
Triggerable
onEventTime
in interface Triggerable<K,W extends Window>
Exception
public void onProcessingTime(InternalTimer<K,W> timer) throws Exception
Triggerable
onProcessingTime
in interface Triggerable<K,W extends Window>
Exception
public Object getFunctionContext()
AbstractOneInputEmbeddedPythonFunctionOperator
getFunctionContext
in class AbstractOneInputEmbeddedPythonFunctionOperator<IN,OUT>
public Object getTimerContext()
AbstractOneInputEmbeddedPythonFunctionOperator
getTimerContext
in class AbstractOneInputEmbeddedPythonFunctionOperator<IN,OUT>
public <T> DataStreamPythonFunctionOperator<T> copy(DataStreamPythonFunctionInfo pythonFunctionInfo, TypeInformation<T> outputTypeInfo)
DataStreamPythonFunctionOperator
copy
in interface DataStreamPythonFunctionOperator<OUT>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.