@Internal
public interface PythonFunctionRunner
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Tear-down the Python function runner.
|
void |
flush()
Forces to finish the processing of the current bundle of elements.
|
void |
open(PythonConfig config)
Prepares the Python function runner, such as preparing the Python execution environment, etc.
|
org.apache.flink.api.java.tuple.Tuple2<byte[],Integer> |
pollResult()
Retrieves the Python function result.
|
void |
process(byte[] data)
Executes the Python function with the input byte array.
|
void |
processTimer(byte[] timerData)
Send the triggered timer to the Python function.
|
org.apache.flink.api.java.tuple.Tuple2<byte[],Integer> |
takeResult()
Retrieves the Python function result, waiting if necessary until an element becomes
available.
|
void open(PythonConfig config) throws Exception
Exceptionvoid process(byte[] data)
throws Exception
data - the byte array data.Exceptionvoid processTimer(byte[] timerData)
throws Exception
Exceptionorg.apache.flink.api.java.tuple.Tuple2<byte[],Integer> pollResult() throws Exception
null if the result buffer is
empty. f0 means the byte array buffer which stores the Python function result. f1 means
the length of the Python function result byte array.Exceptionorg.apache.flink.api.java.tuple.Tuple2<byte[],Integer> takeResult() throws Exception
Exceptionvoid flush()
throws Exception
ExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.