Class PythonTypeUtils
- java.lang.Object
-
- org.apache.flink.streaming.api.utils.PythonTypeUtils
-
@Internal public class PythonTypeUtils extends Object
A util class for converting the given TypeInformation to other objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPythonTypeUtils.ArrayDataConverter<T>The element in the Object Array will be converted to the corresponding Data through element DataConverter.static classPythonTypeUtils.ByteDataConverterPython Long will be converted to Long in PemJa, so we need ByteDataConverter to convert Java Long to internal Byte.static classPythonTypeUtils.DataConverter<IN,OUT>Data Converter that converts the data to the format data which can be used in PemJa.static classPythonTypeUtils.FloatDataConverterPython Float will be converted to Double in PemJa, so we need FloatDataConverter to convert Java Double to internal Float.static classPythonTypeUtils.IdentityDataConverter<T>Identity data converter.static classPythonTypeUtils.IntDataConverterPython Long will be converted to Long in PemJa, so we need IntDataConverter to convert Java Long to internal Integer.static classPythonTypeUtils.ListDataConverterThe element in the List will be converted to the corresponding Data through element DataConverter.static classPythonTypeUtils.MapDataConverterThe key/value in the Map will be converted to the corresponding Data through key/value DataConverter.static classPythonTypeUtils.RowDataConverterRow Data will be converted to the Object Array [RowKind(as Long Object), Field Values(as Object Array)].static classPythonTypeUtils.RowDataDataConverterRowData Data will be converted to the Object Array [RowKind(as Long Object), Field Values(as Object Array)].static classPythonTypeUtils.ShortDataConverterPython Long will be converted to Long in PemJa, so we need ShortDataConverter to convert Java Long to internal Short.static classPythonTypeUtils.TupleDataConverterTuple Data will be converted to the Object Array.static classPythonTypeUtils.TypeInfoToDataConverterGet DataConverter according to the given typeInformation.static classPythonTypeUtils.TypeInfoToProtoConverterGet coder proto according to the given type information.static classPythonTypeUtils.TypeInfoToSerializerConverterGet serializers according to the given typeInformation.
-
Constructor Summary
Constructors Constructor Description PythonTypeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> org.apache.flink.api.common.io.InputFormat<T,?>getCollectionInputFormat(List<T> data, org.apache.flink.api.common.typeinfo.TypeInformation<T> dataType, org.apache.flink.api.common.ExecutionConfig config)Wrap the unpickled python data with an InputFormat.
-
-
-
Method Detail
-
getCollectionInputFormat
public static <T> org.apache.flink.api.common.io.InputFormat<T,?> getCollectionInputFormat(List<T> data, org.apache.flink.api.common.typeinfo.TypeInformation<T> dataType, org.apache.flink.api.common.ExecutionConfig config)
Wrap the unpickled python data with an InputFormat. It will be passed to StreamExecutionEnvironment.creatInput() to create an InputFormat later.- Parameters:
data- The unpickled python data.dataType- The python data type.config- The execution config used to create serializer.- Returns:
- An InputFormat containing the python data.
-
-