Class CollectionInputFormat<T>
- java.lang.Object
-
- org.apache.flink.api.common.io.RichInputFormat<OT,org.apache.flink.core.io.GenericInputSplit>
-
- org.apache.flink.api.common.io.GenericInputFormat<T>
-
- org.apache.flink.streaming.api.legacy.io.CollectionInputFormat<T>
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.io.InputFormat<T,org.apache.flink.core.io.GenericInputSplit>,org.apache.flink.api.common.io.NonParallelInput,org.apache.flink.core.io.InputSplitSource<org.apache.flink.core.io.GenericInputSplit>
public class CollectionInputFormat<T> extends org.apache.flink.api.common.io.GenericInputFormat<T> implements org.apache.flink.api.common.io.NonParallelInputAn input format that returns objects from a collection.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CollectionInputFormat(Collection<T> dataSet, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <X> voidcheckCollection(Collection<X> elements, Class<X> viewedAs)TnextRecord(T record)voidopen(org.apache.flink.core.io.GenericInputSplit split)booleanreachedEnd()StringtoString()-
Methods inherited from class org.apache.flink.api.common.io.GenericInputFormat
close, configure, createInputSplits, getInputSplitAssigner, getStatistics
-
-
-
-
Constructor Detail
-
CollectionInputFormat
public CollectionInputFormat(Collection<T> dataSet, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
-
-
Method Detail
-
reachedEnd
public boolean reachedEnd() throws IOException- Specified by:
reachedEndin interfaceorg.apache.flink.api.common.io.InputFormat<T,org.apache.flink.core.io.GenericInputSplit>- Throws:
IOException
-
open
public void open(org.apache.flink.core.io.GenericInputSplit split) throws IOException- Specified by:
openin interfaceorg.apache.flink.api.common.io.InputFormat<T,org.apache.flink.core.io.GenericInputSplit>- Overrides:
openin classorg.apache.flink.api.common.io.GenericInputFormat<T>- Throws:
IOException
-
nextRecord
public T nextRecord(T record) throws IOException
- Specified by:
nextRecordin interfaceorg.apache.flink.api.common.io.InputFormat<T,org.apache.flink.core.io.GenericInputSplit>- Throws:
IOException
-
checkCollection
public static <X> void checkCollection(Collection<X> elements, Class<X> viewedAs)
-
-