Package org.apache.flink.python.util
Class PythonConnectorUtils
- java.lang.Object
-
- org.apache.flink.python.util.PythonConnectorUtils
-
public class PythonConnectorUtils extends Object
Utility class for using DataStream connectors in Python.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PythonConnectorUtils.FirstColumnTopicSelectorInvocationHandler
The serializableInvocationHandler
as the proxy for first column selector.static class
PythonConnectorUtils.RowRowMapper
AProcessFunction
that convertRow
toRowData
.static class
PythonConnectorUtils.SecondColumnSerializationSchema<T>
ASerializationSchema
forRow
that only serialize the second column using a wrappedSerializationSchema
forPythonConnectorUtils.SecondColumnSerializationSchema
.
-
Constructor Summary
Constructors Constructor Description PythonConnectorUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
createFirstColumnTopicSelector(Class<T> clazz)
Creates a selector that returns the first column of a row, and cast it toclazz
.
-
-
-
Method Detail
-
createFirstColumnTopicSelector
public static <T> T createFirstColumnTopicSelector(Class<T> clazz)
Creates a selector that returns the first column of a row, and cast it toclazz
.T
should be a sub interface ofFunction
, which accepts aRow
.- Type Parameters:
T
- An interface- Parameters:
clazz
- The desired selector class to cast to, e.g. TopicSelector.class for Kafka.
-
-