public interface RecordReader extends Closeable, Serializable, Configurable
| Modifier and Type | Field and Description |
|---|---|
static String |
APPEND_LABEL |
static String |
LABELS |
static String |
NAME_SPACE |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getLabels()
List of label strings
|
boolean |
hasNext()
Whether there are anymore records
|
void |
initialize(Configuration conf,
InputSplit split)
Called once at initialization.
|
void |
initialize(InputSplit split)
Called once at initialization.
|
Collection<Writable> |
next()
Get the next record
|
Collection<Writable> |
record(URI uri,
DataInputStream dataInputStream)
Load the record from the given DataInputStream
Unlike
next() the internal state of the RecordReader is not modified
Implementations of this method should not close the DataInputStream |
void |
reset()
Reset record reader iterator
|
getConf, setConfstatic final String NAME_SPACE
static final String APPEND_LABEL
static final String LABELS
void initialize(InputSplit split) throws IOException, InterruptedException
split - the split that defines the range of records to readIOExceptionInterruptedExceptionvoid initialize(Configuration conf, InputSplit split) throws IOException, InterruptedException
conf - a configuration for initializationsplit - the split that defines the range of records to readIOExceptionInterruptedExceptionCollection<Writable> next()
boolean hasNext()
void reset()
Collection<Writable> record(URI uri, DataInputStream dataInputStream) throws IOException
next() the internal state of the RecordReader is not modified
Implementations of this method should not close the DataInputStreamIOException - if error occurs during reading from the input streamCopyright © 2016. All rights reserved.