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:
nextBatch
in interfaceRecordReader
- Throws:
IOException
-
getRowNumber
- Specified by:
getRowNumber
in interfaceRecordReader
- Throws:
IOException
-
getProgress
- Specified by:
getProgress
in interfaceRecordReader
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceRecordReader
- Throws:
IOException
-
seekToRow
- Specified by:
seekToRow
in interfaceRecordReader
- Throws:
IOException
-