public class FlatFileInputFormat.FlatFileRecordReader<R>
extends java.lang.Object
RecordReader
for plain files with Deserializer
records
Reads one row at a time of type R. R is intended to be a base class of
something such as: Record, Writable, Text, ...Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SerializationContextImplKey
The JobConf key of the SerializationContext to use.
|
Constructor and Description |
---|
FlatFileRecordReader(Configuration conf,
FileSplit split)
FlatFileRecordReader constructor constructs the underlying stream
(potentially decompressed) and creates the deserializer.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.Void |
createKey() |
FlatFileInputFormat.RowContainer<R> |
createValue() |
long |
getPos() |
float |
getProgress() |
boolean |
next(java.lang.Void key,
FlatFileInputFormat.RowContainer<R> value)
Returns the next row # and value.
|
public static final java.lang.String SerializationContextImplKey
public FlatFileRecordReader(Configuration conf, FileSplit split) throws java.io.IOException
conf
- the jobconfsplit
- the split for this filejava.io.IOException
public java.lang.Void createKey()
public FlatFileInputFormat.RowContainer<R> createValue()
public boolean next(java.lang.Void key, FlatFileInputFormat.RowContainer<R> value) throws java.io.IOException
key
- - void as these files have a value onlyvalue
- - the row container which is always re-used, but the internal
value may be set to a new Objectjava.io.IOException
- from the deserializerpublic float getProgress() throws java.io.IOException
java.io.IOException
public long getPos() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
Copyright © 2012 The Apache Software Foundation