T - Type of the elements read by the Readers.public class ConcatReader<T> extends Reader<T>
Reader that reads elements from a given set of encoded Sources. Creates Readers for sources lazily, i.e. only when elements from the particular Reader are about
to be read.
This class does does not cache Readers and creates a new Reader every time a
new ReaderIterator has to be created. Because of this, multiple iterators created using
the same ConcatReader will not be able to share any state between each other. This design
was chosen since keeping a large number of Reader objects alive within a single
ConcatReader could be highly memory consuming.
Reader.AbstractReaderIterator<T>, Reader.DynamicSplitRequest, Reader.DynamicSplitResult, Reader.DynamicSplitResultWithPosition, Reader.Position, Reader.Progress, Reader.ReaderIterator<T>| Modifier and Type | Field and Description |
|---|---|
static String |
SOURCE_NAME |
stateSampler, stateSamplerOperationName| Constructor and Description |
|---|
ConcatReader(PipelineOptions options,
ExecutionContext executionContext,
List<com.google.api.services.dataflow.model.Source> sources)
Create a
ConcatReader using a given list of encoded Sources. |
| Modifier and Type | Method and Description |
|---|---|
Iterator<com.google.api.services.dataflow.model.Source> |
getSources() |
Reader.ReaderIterator<T> |
iterator()
Returns a ReaderIterator that allows reading from this source.
|
notifyElementRead, setStateSamplerAndOperationName, supportsRestartaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedpublic static final String SOURCE_NAME
public ConcatReader(PipelineOptions options, ExecutionContext executionContext, List<com.google.api.services.dataflow.model.Source> sources)
ConcatReader using a given list of encoded Sources.public Iterator<com.google.api.services.dataflow.model.Source> getSources()
public Reader.ReaderIterator<T> iterator() throws IOException
Readeriterator in class Reader<T>IOException