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, getStatisticspublic CollectionInputFormat(Collection<T> dataSet, TypeSerializer<T> serializer)
public boolean reachedEnd()
throws IOException
reachedEnd in interface InputFormat<T,GenericInputSplit>IOExceptionpublic void open(GenericInputSplit split) throws IOException
open in interface InputFormat<T,GenericInputSplit>open in class GenericInputFormat<T>IOExceptionpublic T nextRecord(T record) throws IOException
nextRecord in interface InputFormat<T,GenericInputSplit>IOExceptionpublic static <X> void checkCollection(Collection<X> elements, Class<X> viewedAs)
Copyright © 2015 The Apache Software Foundation. All rights reserved.