|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Reader
The interface for reading ORC files. One Reader can support multiple concurrent RecordReader.
Nested Class Summary | |
---|---|
static class |
Reader.Options
Options for creating a RecordReader. |
Method Summary | |
---|---|
CompressionKind |
getCompression()
Get the compression kind. |
int |
getCompressionSize()
Get the buffer size for the compression. |
long |
getContentLength()
Get the length of the file. |
Metadata |
getMetadata()
Get the metadata information like stripe level column statistics etc. |
List<String> |
getMetadataKeys()
Get the user metadata keys. |
ByteBuffer |
getMetadataValue(String key)
Get a user metadata value. |
long |
getNumberOfRows()
Get the number of rows in the file. |
ObjectInspector |
getObjectInspector()
Get the object inspector for looking at the objects. |
long |
getRawDataSize()
Get the deserialized data size of the file |
long |
getRawDataSizeOfColumns(List<String> colNames)
Get the deserialized data size of the specified columns |
int |
getRowIndexStride()
Get the number of rows per a entry in the row index. |
ColumnStatistics[] |
getStatistics()
Get the statistics about the columns in the file. |
List<StripeInformation> |
getStripes()
Get the list of stripes. |
List<org.apache.hadoop.hive.ql.io.orc.OrcProto.Type> |
getTypes()
Get the list of types contained in the file. |
boolean |
hasMetadataValue(String key)
Did the user set the given metadata value. |
RecordReader |
rows()
Create a RecordReader that reads everything with the default options. |
RecordReader |
rows(boolean[] include)
Create a RecordReader that will scan the entire file. |
RecordReader |
rows(long offset,
long length,
boolean[] include)
Create a RecordReader that will start reading at the first stripe after offset up to the stripe that starts at offset + length. |
RecordReader |
rows(long offset,
long length,
boolean[] include,
SearchArgument sarg,
String[] neededColumns)
Create a RecordReader that will read a section of a file. |
RecordReader |
rowsOptions(Reader.Options options)
Create a RecordReader that uses the options given. |
Method Detail |
---|
long getNumberOfRows()
long getRawDataSize()
long getRawDataSizeOfColumns(List<String> colNames)
colNames
-
List<String> getMetadataKeys()
ByteBuffer getMetadataValue(String key)
key
- a key given by the user
boolean hasMetadataValue(String key)
key
- the key to check
CompressionKind getCompression()
int getCompressionSize()
int getRowIndexStride()
List<StripeInformation> getStripes()
ObjectInspector getObjectInspector()
long getContentLength()
ColumnStatistics[] getStatistics()
Metadata getMetadata() throws IOException
IOException
List<org.apache.hadoop.hive.ql.io.orc.OrcProto.Type> getTypes()
RecordReader rows() throws IOException
IOException
RecordReader rowsOptions(Reader.Options options) throws IOException
options
- the options to read with
IOException
RecordReader rows(boolean[] include) throws IOException
include
- true for each column that should be included
IOException
RecordReader rows(long offset, long length, boolean[] include) throws IOException
offset
- a byte offset in the filelength
- a number of bytes in the fileinclude
- true for each column that should be included
IOException
RecordReader rows(long offset, long length, boolean[] include, SearchArgument sarg, String[] neededColumns) throws IOException
offset
- the minimum offset of the first stripe to readlength
- the distance from offset of the first address to stop reading
atinclude
- true for each column that should be includedsarg
- a search argument that limits the rows that should be read.neededColumns
- the names of the included columns
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |