@Internal public interface PythonFunctionRunner extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Tear-down the Python function runner.
|
void |
flush()
Forces to finish the processing of the current bundle of elements.
|
void |
open(ReadableConfig config)
Prepares the Python function runner, such as preparing the Python execution environment, etc.
|
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.
|
Tuple3<String,byte[],Integer> |
takeResult()
Retrieves the Python function result, waiting if necessary until an element becomes
available.
|
void open(ReadableConfig config) throws Exception
Exception
void close() throws Exception
close
in interface AutoCloseable
Exception
void process(byte[] data) throws Exception
data
- the byte array data.Exception
void processTimer(byte[] timerData) throws Exception
Exception
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.Exception
Tuple3<String,byte[],Integer> takeResult() throws Exception
Exception
void flush() throws Exception
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.