public class RecordReader<E> extends Object implements Iterable<E>
RecordReader
implements the policy for deserializing each
line of the file.Constructor and Description |
---|
RecordReader(String inputFile,
Class<E> clazz)
Creates the record reader, it will be possible to iterate on the object
serialized on the file inputFile.
|
RecordReader(String inputFile,
RecordParser<E> parser)
Creates the record reader, it will be possible to iterate on the object
serialized on the file inputFile.
|
public RecordReader(String inputFile, RecordParser<E> parser)
inputFile
- the file containing the serialized object
(one per line). If the file ends with .gz, a compressed input reader will be used.parser
- the object parser, in order to deserialize each line in a object.public RecordReader(String inputFile, Class<E> clazz)
inputFile
- the file containing the serialized object (one per line).
If the file ends with .gz, a compressed input reader will be used.clazz
- the class of the object to parse.public RecordReader<E> filter(Filter<E>... filters)
Filter
or more to the reader, only objects that do not
match any filter will be returned.filters
- the list of filter to match against each object.Copyright © 2013. All rights reserved.