Package org.apache.orc
Interface RecordReader
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
RecordReaderImpl
A row-by-row iterator for ORC files.
- Since:
- 1.1.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Release the resources associated with the given reader.floatGet the progress of the reader through the rows.longGet the row number of the row that will be returned by the following call to next().booleannextBatch(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch) Read the next row batch.voidseekToRow(long rowCount) Seek to a particular row number.
-
Method Details
-
nextBatch
boolean nextBatch(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch) throws IOException Read the next row batch. The size of the batch to read cannot be controlled by the callers. Caller need to look at VectorizedRowBatch.size of the returned object to know the batch size read.- Parameters:
batch- a row batch object to read into- Returns:
- were more rows available to read?
- Throws:
IOException- Since:
- 1.1.0
-
getRowNumber
Get the row number of the row that will be returned by the following call to next().- Returns:
- the row number from 0 to the number of rows in the file
- Throws:
IOException- Since:
- 1.1.0
-
getProgress
Get the progress of the reader through the rows.- Returns:
- a fraction between 0.0 and 1.0 of rows read
- Throws:
IOException- Since:
- 1.1.0
-
close
Release the resources associated with the given reader.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- Since:
- 1.1.0
-
seekToRow
Seek to a particular row number.- Throws:
IOException- Since:
- 1.1.0
-