Class PythonTypeUtils
java.lang.Object
org.apache.flink.streaming.api.utils.PythonTypeUtils
A util class for converting the given TypeInformation to other objects.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe element in the Object Array will be converted to the corresponding Data through element DataConverter.static final classPython Long will be converted to Long in PemJa, so we need ByteDataConverter to convert Java Long to internal Byte.static classData Converter that converts the data to the format data which can be used in PemJa.static final classPython Float will be converted to Double in PemJa, so we need FloatDataConverter to convert Java Double to internal Float.static final classIdentity data converter.static final classPython Long will be converted to Long in PemJa, so we need IntDataConverter to convert Java Long to internal Integer.static final classThe element in the List will be converted to the corresponding Data through element DataConverter.static final classThe key/value in the Map will be converted to the corresponding Data through key/value DataConverter.static final classRow Data will be converted to the Object Array [RowKind(as Long Object), Field Values(as Object Array)].static final classRowData Data will be converted to the Object Array [RowKind(as Long Object), Field Values(as Object Array)].static final classPython Long will be converted to Long in PemJa, so we need ShortDataConverter to convert Java Long to internal Short.static final classTuple Data will be converted to the Object Array.static classGet DataConverter according to the given typeInformation.static classGet coder proto according to the given type information.static classGet serializers according to the given typeInformation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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.
-
Constructor Details
-
PythonTypeUtils
public PythonTypeUtils()
-
-
Method Details
-
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.
-