public class PythonMapFunction extends AbstractPythonUDF<MapFunction<org.python.core.PyObject,org.python.core.PyObject>> implements MapFunction<org.python.core.PyObject,org.python.core.PyObject>
PythonMapFunction
is a thin wrapper layer over a Python UDF MapFunction
.
It receives a MapFunction
as an input and keeps it internally in a serialized form.
It is then delivered, as part of the job graph, up to the TaskManager, then it is opened and becomes
a sort of mediator to the Python UDF MapFunction
.
This function is used internally by the Python thin wrapper layer over the streaming data functionality
fun, log
Constructor and Description |
---|
PythonMapFunction(MapFunction<org.python.core.PyObject,org.python.core.PyObject> fun) |
Modifier and Type | Method and Description |
---|---|
org.python.core.PyObject |
map(org.python.core.PyObject value)
The mapping method.
|
close, open
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
public PythonMapFunction(MapFunction<org.python.core.PyObject,org.python.core.PyObject> fun) throws IOException
IOException
public org.python.core.PyObject map(org.python.core.PyObject value) throws Exception
MapFunction
map
in interface MapFunction<org.python.core.PyObject,org.python.core.PyObject>
value
- The input value.Exception
- This method may throw exceptions. Throwing an exception will cause the operation
to fail and may trigger recovery.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.