Class DataStreamV2SourceUtils


  • @Experimental
    public final class DataStreamV2SourceUtils
    extends Object
    Utils to create the DataStream V2 supported Source.
    • Constructor Detail

      • DataStreamV2SourceUtils

        public DataStreamV2SourceUtils()
    • Method Detail

      • wrapSource

        public static <T> org.apache.flink.api.connector.dsv2.Source<T> wrapSource​(Source<T,​?,​?> source)
        Wrap a FLIP-27 based source to a DataStream V2 supported source.
        Parameters:
        source - The FLIP-27 based source to wrap.
        Returns:
        The DataStream V2 supported source.
      • fromData

        public static <T> org.apache.flink.api.connector.dsv2.Source<T> fromData​(Collection<T> data)
        Creates a source that contains the given elements.The type of the data stream is that of the elements in the collection.
        Type Parameters:
        T - The generic type of the returned data stream.
        Parameters:
        data - The collection of elements to create the source from.
        Returns:
        The source representing the given collection