public class CollectionInputFormat<T> extends GenericInputFormat<T> implements NonParallelInput
partitionNumber
Constructor and Description |
---|
CollectionInputFormat(Collection<T> dataSet,
TypeSerializer<T> serializer) |
Modifier and Type | Method and Description |
---|---|
static <X> void |
checkCollection(Collection<X> elements,
Class<X> viewedAs) |
T |
nextRecord(T record) |
void |
open(GenericInputSplit split) |
boolean |
reachedEnd() |
String |
toString() |
close, configure, createInputSplits, getInputSplitAssigner, getStatistics
public CollectionInputFormat(Collection<T> dataSet, TypeSerializer<T> serializer)
public boolean reachedEnd() throws IOException
reachedEnd
in interface InputFormat<T,GenericInputSplit>
IOException
public void open(GenericInputSplit split) throws IOException
open
in interface InputFormat<T,GenericInputSplit>
open
in class GenericInputFormat<T>
IOException
public T nextRecord(T record) throws IOException
nextRecord
in interface InputFormat<T,GenericInputSplit>
IOException
public static <X> void checkCollection(Collection<X> elements, Class<X> viewedAs)
Copyright © 2015 The Apache Software Foundation. All rights reserved.