@PublicEvolving public class ParallelIteratorInputFormat<T> extends GenericInputFormat<T>
SplittableIterator
.partitionNumber
Constructor and Description |
---|
ParallelIteratorInputFormat(SplittableIterator<T> iterator) |
Modifier and Type | Method and Description |
---|---|
T |
nextRecord(T reuse)
Reads the next record from the input.
|
void |
open(GenericInputSplit split)
Opens a parallel instance of the input format to work on a split.
|
boolean |
reachedEnd()
Method used to check if the end of the input is reached.
|
close, configure, createInputSplits, getInputSplitAssigner, getStatistics
closeInputFormat, getRuntimeContext, openInputFormat, setRuntimeContext
public ParallelIteratorInputFormat(SplittableIterator<T> iterator)
public void open(GenericInputSplit split) throws IOException
InputFormat
When this method is called, the input format it guaranteed to be configured.
open
in interface InputFormat<T,GenericInputSplit>
open
in class GenericInputFormat<T>
split
- The split to be opened.IOException
- Thrown, if the spit could not be opened due to an I/O problem.public boolean reachedEnd()
InputFormat
When this method is called, the input format it guaranteed to be opened.
public T nextRecord(T reuse)
InputFormat
When this method is called, the input format it guaranteed to be opened.
reuse
- Object that may be reused.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.