@Internal public interface PythonFunctionRunner
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(PythonConfig config)
Prepares the Python function runner, such as preparing the Python execution environment, etc.
|
Tuple2<byte[],Integer> |
pollResult()
Retrieves the Python function result.
|
void |
process(byte[] data)
Executes the Python function with the input byte array.
|
void open(PythonConfig config) throws Exception
Exception
void process(byte[] data) throws Exception
data
- the byte array data.Exception
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.Exception
void flush() throws Exception
Exception
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.