public class CSVRecordReader extends LineRecordReader
| Modifier and Type | Field and Description |
|---|---|
static String |
DELIMITER |
static String |
SKIP_NUM_LINES |
confAPPEND_LABEL, LABELS, NAME_SPACE| Constructor and Description |
|---|
CSVRecordReader() |
CSVRecordReader(int skipNumLines)
Skip first n lines
|
CSVRecordReader(int skipNumLines,
String delimiter)
Skip lines and use delimiter
|
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(Configuration conf,
InputSplit split)
Called once at initialization.
|
Collection<Writable> |
next()
Get the next record
|
close, getConf, hasNext, initialize, setConfpublic static final String SKIP_NUM_LINES
public static final String DELIMITER
public CSVRecordReader(int skipNumLines)
skipNumLines - the number of lines to skippublic CSVRecordReader(int skipNumLines,
String delimiter)
skipNumLines - the number of lines to skipdelimiter - the delimiterpublic CSVRecordReader()
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 LineRecordReaderCopyright © 2015. All rights reserved.