public class CSVRegexRecordReader extends CSVRecordReader
| Modifier and Type | Field and Description |
|---|---|
protected String |
delimiter |
protected Pattern[] |
patterns |
protected String |
quote |
protected String[] |
regexs |
DEFAULT_DELIMITER, DEFAULT_QUOTE, DELIMITER, QUOTE, SKIP_NUM_LINES, skipNumLinesconf, inputSplit, lineIndex, locations, splitIndexlistenersAPPEND_LABEL, LABELS, NAME_SPACE| Constructor and Description |
|---|
CSVRegexRecordReader(int skipNumLines,
String delimiter,
String quote,
String[] regexs)
Skip lines, use delimiter, strip quotes, and parse each column with a regex
|
| Modifier and Type | Method and Description |
|---|---|
protected List<Writable> |
parseLine(String line) |
hasNext, initialize, loadFromMetaData, loadFromMetaData, next, nextRecord, onLocationOpen, record, resetclose, closeIfRequired, getConf, getIterator, getLabels, initialize, setConfbatchesSupported, getListeners, invokeListeners, next, setListeners, setListenersprotected String[] regexs
protected Pattern[] patterns
protected String delimiter
protected String quote
public CSVRegexRecordReader(int skipNumLines,
String delimiter,
String quote,
String[] regexs)
skipNumLines - the number of lines to skipdelimiter - the delimiterquote - the quote to stripregexs - the regexs to parse columns withprotected List<Writable> parseLine(String line)
parseLine in class CSVRecordReaderCopyright © 2017. All rights reserved.