@Internal public abstract class AbstractEmbeddedPythonFunctionOperator<OUT> extends AbstractPythonFunctionOperator<OUT>
Modifier and Type | Field and Description |
---|---|
protected pemja.core.PythonInterpreter |
interpreter
Every operator will hold the only python interpreter.
|
bundleFinishedCallback, config, elementCount, lastFinishBundleTime, maxBundleSize, systemEnvEnabled
chainingStrategy, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
Constructor and Description |
---|
AbstractEmbeddedPythonFunctionOperator(Configuration config) |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method is called at the very end of the operator's life, both in the case of a
successful completion of the operation, and in the case of a failure and canceling.
|
protected EmbeddedPythonEnvironmentManager |
createPythonEnvironmentManager() |
protected void |
invokeFinishBundle() |
void |
open()
This method is called immediately before any elements are processed, it should contain the
operator's initialization logic, e.g. state initialization.
|
abstract void |
openPythonInterpreter()
Setup method for Python Interpreter.
|
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
getOperatorAttributes
hasKeyContext
protected transient pemja.core.PythonInterpreter interpreter
public AbstractEmbeddedPythonFunctionOperator(Configuration config)
public void open() throws Exception
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<OUT>
open
in class AbstractPythonFunctionOperator<OUT>
Exception
- An exception in this method causes the operator to fail.public void close() throws Exception
StreamOperator
This method is expected to make a thorough effort to release all resources that the operator has acquired.
NOTE:It can not emit any records! If you need to emit records at the end of
processing, do so in the StreamOperator.finish()
method.
close
in interface StreamOperator<OUT>
close
in class AbstractPythonFunctionOperator<OUT>
Exception
protected EmbeddedPythonEnvironmentManager createPythonEnvironmentManager()
createPythonEnvironmentManager
in class AbstractPythonFunctionOperator<OUT>
protected void invokeFinishBundle() throws Exception
invokeFinishBundle
in class AbstractPythonFunctionOperator<OUT>
Exception
public abstract void openPythonInterpreter()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.