@Internal public interface PythonFunctionRunner extends AutoCloseable
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Tear-down the Python function runner.
|
void |
flush()
Forces to finish the processing of the current bundle of elements.
|
void |
open(org.apache.flink.configuration.ReadableConfig config)
Prepares the Python function runner, such as preparing the Python execution environment, etc.
|
org.apache.flink.api.java.tuple.Tuple3<String,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.Tuple3<String,byte[],Integer> |
takeResult()
Retrieves the Python function result, waiting if necessary until an element becomes
available.
|
void open(org.apache.flink.configuration.ReadableConfig config) throws Exception
Exceptionvoid close()
throws Exception
close 在接口中 AutoCloseableExceptionvoid process(byte[] data)
throws Exception
data - the byte array data.Exceptionvoid processTimer(byte[] timerData)
throws Exception
Exceptionorg.apache.flink.api.java.tuple.Tuple3<String,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.Tuple3<String,byte[],Integer> takeResult() throws Exception
Exceptionvoid flush()
throws Exception
ExceptionCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.