public class RegexLineRecordReader extends LineRecordReader
Pattern and Matcher.| Modifier and Type | Field and Description |
|---|---|
static String |
SKIP_NUM_LINES |
conf, inputSplitAPPEND_LABEL, LABELS, NAME_SPACE| Constructor and Description |
|---|
RegexLineRecordReader(String regex,
int skipNumLines) |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(Configuration conf,
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
RecordReader.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
|
close, getConf, getLabels, hasNext, initialize, setConfpublic static final String SKIP_NUM_LINES
public RegexLineRecordReader(String regex, int skipNumLines)
public void initialize(Configuration conf, InputSplit split) throws IOException, InterruptedException
RecordReaderinitialize in interface RecordReaderinitialize in class LineRecordReaderconf - a configuration for initializationsplit - the split that defines the range of records to readIOExceptionInterruptedExceptionpublic Collection<Writable> next()
RecordReadernext in interface RecordReadernext in class LineRecordReaderpublic Collection<Writable> record(URI uri, DataInputStream dataInputStream) throws IOException
RecordReaderRecordReader.next() the internal state of the RecordReader is not modified
Implementations of this method should not close the DataInputStreamrecord in interface RecordReaderrecord in class LineRecordReaderIOException - if error occurs during reading from the input streampublic void reset()
RecordReaderreset in interface RecordReaderreset in class LineRecordReaderCopyright © 2016. All rights reserved.