Class PythonBridgeUtils
- java.lang.Object
-
- org.apache.flink.api.common.python.PythonBridgeUtils
-
public final class PythonBridgeUtils extends Object
Utility class that contains helper methods to create a TableSource from a file which contains Python objects.
-
-
Constructor Summary
Constructors Constructor Description PythonBridgeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectgetPickledBytesFromJavaObject(Object obj, org.apache.flink.api.common.typeinfo.TypeInformation<?> dataType)static ObjectgetPickledBytesFromRow(org.apache.flink.types.Row row, org.apache.flink.table.types.DataType[] dataTypes)static byte[]pickleValue(Object value, byte type)static List<byte[]>readPickledBytes(String fileName)static List<?>readPythonObjects(String fileName)static List<Object[]>readPythonObjects(String fileName, boolean batched)
-
-
-
Method Detail
-
readPythonObjects
public static List<Object[]> readPythonObjects(String fileName, boolean batched) throws IOException
- Throws:
IOException
-
readPythonObjects
public static List<?> readPythonObjects(String fileName) throws IOException
- Throws:
IOException
-
pickleValue
public static byte[] pickleValue(Object value, byte type)
-
readPickledBytes
public static List<byte[]> readPickledBytes(String fileName) throws IOException
- Throws:
IOException
-
getPickledBytesFromJavaObject
public static Object getPickledBytesFromJavaObject(Object obj, org.apache.flink.api.common.typeinfo.TypeInformation<?> dataType) throws IOException
- Throws:
IOException
-
getPickledBytesFromRow
public static Object getPickledBytesFromRow(org.apache.flink.types.Row row, org.apache.flink.table.types.DataType[] dataTypes) throws IOException
- Throws:
IOException
-
-