public interface Reader extends Closeable
One Reader can support multiple concurrent RecordReader.
Modifier and Type | Interface and Description |
---|---|
static class |
Reader.Options
Options for creating a RecordReader.
|
Modifier and Type | Method and Description |
---|---|
EncryptionKey[] |
getColumnEncryptionKeys()
Get the list of encryption keys for column encryption.
|
CompressionKind |
getCompressionKind()
Get the compression kind.
|
int |
getCompressionSize()
Get the buffer size for the compression.
|
long |
getContentLength()
Get the length of the file.
|
boolean |
getConvertToProlepticGregorian()
Should the returned values use the proleptic Gregorian calendar?
|
DataMaskDescription[] |
getDataMasks()
Get the data masks for the unencrypted variant of the data.
|
EncryptionVariant[] |
getEncryptionVariants()
Get the list of encryption variants for the data.
|
OrcProto.FileTail |
getFileTail()
Get the file tail (footer + postscript)
|
OrcFile.Version |
getFileVersion()
Get the file format version.
|
List<String> |
getMetadataKeys()
Get the user metadata keys.
|
int |
getMetadataSize() |
ByteBuffer |
getMetadataValue(String key)
Get a user metadata value.
|
long |
getNumberOfRows()
Get the number of rows in the file.
|
List<OrcProto.ColumnStatistics> |
getOrcProtoFileStatistics()
Deprecated.
Use
getStatistics() instead. |
List<OrcProto.StripeStatistics> |
getOrcProtoStripeStatistics()
Deprecated.
Use
getStripeStatistics() instead. |
long |
getRawDataSize()
Get the deserialized data size of the file
|
long |
getRawDataSizeFromColIndices(List<Integer> colIds)
Get the deserialized data size of the specified columns ids
|
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.
|
TypeDescription |
getSchema()
Get the type of rows in this ORC file.
|
ByteBuffer |
getSerializedFileFooter() |
String |
getSoftwareVersion()
Get the implementation and version of the software that wrote the file.
|
ColumnStatistics[] |
getStatistics()
Get the statistics about the columns in the file.
|
List<StripeInformation> |
getStripes()
Get the list of stripes.
|
List<StripeStatistics> |
getStripeStatistics()
Get the stripe statistics for all of the columns.
|
List<StripeStatistics> |
getStripeStatistics(boolean[] include)
Get the stripe statistics from the file.
|
List<OrcProto.Type> |
getTypes()
Deprecated.
use getSchema instead
|
List<StripeStatistics> |
getVariantStripeStatistics(EncryptionVariant variant)
Get the stripe statistics for a given variant.
|
List<Integer> |
getVersionList() |
OrcFile.WriterVersion |
getWriterVersion()
Get the version of the writer of this file.
|
boolean |
hasMetadataValue(String key)
Did the user set the given metadata value.
|
Reader.Options |
options()
Create a default options object that can be customized for creating
a RecordReader.
|
RecordReader |
rows()
Create a RecordReader that reads everything with the default options.
|
RecordReader |
rows(Reader.Options options)
Create a RecordReader that uses the options given.
|
boolean |
writerUsedProlepticGregorian()
Was the file written using the proleptic Gregorian calendar.
|
long getNumberOfRows()
long getRawDataSize()
long getRawDataSizeOfColumns(List<String> colNames)
colNames
- the list of column nameslong getRawDataSizeFromColIndices(List<Integer> colIds)
colIds
- - internal column id (check orcfiledump for column ids)List<String> getMetadataKeys()
ByteBuffer getMetadataValue(String key)
key
- a key given by the userboolean hasMetadataValue(String key)
key
- the key to checkCompressionKind getCompressionKind()
int getCompressionSize()
int getRowIndexStride()
List<StripeInformation> getStripes()
long getContentLength()
ColumnStatistics[] getStatistics()
TypeDescription getSchema()
List<OrcProto.Type> getTypes()
OrcFile.Version getFileVersion()
OrcFile.WriterVersion getWriterVersion()
String getSoftwareVersion()
OrcProto.FileTail getFileTail()
EncryptionKey[] getColumnEncryptionKeys()
DataMaskDescription[] getDataMasks()
EncryptionVariant[] getEncryptionVariants()
List<StripeStatistics> getVariantStripeStatistics(EncryptionVariant variant) throws IOException
variant
- the encryption variant or null for unencryptedIOException
- if the required key is not availableReader.Options options()
RecordReader rows() throws IOException
IOException
RecordReader rows(Reader.Options options) throws IOException
options
- the options to read withIOException
List<Integer> getVersionList()
int getMetadataSize()
List<OrcProto.StripeStatistics> getOrcProtoStripeStatistics()
getStripeStatistics()
instead.List<StripeStatistics> getStripeStatistics() throws IOException
IOException
List<StripeStatistics> getStripeStatistics(boolean[] include) throws IOException
include
- null for all columns or an array where the required columns
are selectedIOException
List<OrcProto.ColumnStatistics> getOrcProtoFileStatistics()
getStatistics()
instead.ByteBuffer getSerializedFileFooter()
boolean writerUsedProlepticGregorian()
boolean getConvertToProlepticGregorian()
Copyright © 2013–2023 The Apache Software Foundation. All rights reserved.