Package org.apache.orc.tools.convert
Class CsvReader
java.lang.Object
org.apache.orc.tools.convert.CsvReader
- All Implemented Interfaces:
Closeable,AutoCloseable,RecordReader
-
Constructor Summary
ConstructorsConstructorDescriptionCsvReader(Reader reader, FSDataInputStream input, long size, TypeDescription schema, char separatorChar, char quoteChar, char escapeChar, int headerLines, String nullString, String timestampFormat) Create a CSV reader -
Method Summary
-
Constructor Details
-
CsvReader
public CsvReader(Reader reader, FSDataInputStream input, long size, TypeDescription schema, char separatorChar, char quoteChar, char escapeChar, int headerLines, String nullString, String timestampFormat) Create a CSV reader- Parameters:
reader- the stream to read frominput- the underlying file that is only used for getting the position within the filesize- the number of bytes in the underlying streamschema- the schema to read intoseparatorChar- the character between fieldsquoteChar- the quote characterescapeChar- the escape characterheaderLines- the number of header linesnullString- the string that is translated to nulltimestampFormat- the timestamp format string
-
-
Method Details
-
nextBatch
public boolean nextBatch(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch) throws IOException - Specified by:
nextBatchin interfaceRecordReader- Throws:
IOException
-
getRowNumber
- Specified by:
getRowNumberin interfaceRecordReader- Throws:
IOException
-
getProgress
- Specified by:
getProgressin interfaceRecordReader- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceRecordReader- Throws:
IOException
-
seekToRow
- Specified by:
seekToRowin interfaceRecordReader- Throws:
IOException
-