T - the type of the elements read from the sourcepublic class TextReader<T> extends FileBasedReader<T>
FileBasedReader.DecompressingStreamFactory, FileBasedReader.FileBasedIterator, FileBasedReader.FilenameBasedStreamFactoryReader.AbstractReaderIterator<T>, Reader.DynamicSplitRequest, Reader.DynamicSplitResult, Reader.DynamicSplitResultWithPosition, Reader.Position, Reader.Progress, Reader.ReaderIterator<T>BUF_SIZE, coder, endPosition, filename, startPosition, useDefaultBufferSizestateSampler, stateSamplerOperationName| Modifier | Constructor and Description |
|---|---|
protected |
TextReader(String filename,
boolean stripTrailingNewlines,
Long startPosition,
Long endPosition,
Coder<T> coder,
boolean useDefaultBufferSize,
TextIO.CompressionType compressionType) |
|
TextReader(String filename,
boolean stripTrailingNewlines,
Long startPosition,
Long endPosition,
Coder<T> coder,
TextIO.CompressionType compressionType) |
| Modifier and Type | Method and Description |
|---|---|
protected Reader.ReaderIterator<T> |
newReaderIteratorForFiles(IOChannelFactory factory,
Collection<String> files)
Returns a new iterator for elements in the given files.
|
protected Reader.ReaderIterator<T> |
newReaderIteratorForRangeInFile(IOChannelFactory factory,
String oneFile,
long startPosition,
Long endPosition)
Returns a new iterator for elements in the given range in the
given file.
|
iteratornotifyElementRead, setStateSamplerAndOperationName, supportsRestartaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedpublic TextReader(String filename, boolean stripTrailingNewlines, @Nullable Long startPosition, @Nullable Long endPosition, Coder<T> coder, TextIO.CompressionType compressionType)
protected Reader.ReaderIterator<T> newReaderIteratorForRangeInFile(IOChannelFactory factory, String oneFile, long startPosition, @Nullable Long endPosition) throws IOException
FileBasedReadernewReaderIteratorForRangeInFile in class FileBasedReader<T>endPosition - offset of the end position; null means end-of-fileIOExceptionprotected Reader.ReaderIterator<T> newReaderIteratorForFiles(IOChannelFactory factory, Collection<String> files) throws IOException
FileBasedReadernewReaderIteratorForFiles in class FileBasedReader<T>IOException