ORC文件结构
2023-10-09 09:20:25 0 举报
AI智能生成
ORC文件结构解析
作者其他创作
大纲/内容
Tail
postScript
footerLength :footer数据长度
compression:数据压缩类型
metadataLength:元数据长度
stripeStatisticsLength :加密后的stripe statistics长度
footer
headerLength 头部长度
contentLength:文件内容长度
stripes:存储文件stripe元信息
对应的java类:StripeInformationImpl
组成
offset:stripe在该文件中偏移量
indexLength:索引长度
Stripe index
dataLength:数据长度
Stripe data
footerLength:数据长度
Stripe Footer
numberOfRows: 数据量
encryptStripeId:加密信息的位置???
encryptedLocalKeys:加密数据的Key,每个列都有一个
Type types :记录文件schema信息
UserMetadataItem metadata :用户信息
numberOfRows:文件数据行数
ColumnStatistics statistics :文件中每列的统计
rowIndexStride:index Stream 中group的行数
writer:写入者是谁,C++、JAVA或Presto 、trino
Encryption encryption :文件的加密信息
组成
EncryptionVariant variants 集合
bytes encryptedKey
Stream stripeStatistics
bytes fileStatistics
DataMask
EncryptionKey key
keyName_
algorithm_
bitField0_
KeyProviderKind :KeyProvider的类型,文件中不存储Keyprovider信息
映射的JAVA类:ReaderEncryption
KeyProvider keyProvider
ReaderEncryptionKey[] keys
name
version
algorithm
List<ReaderEncryptionVariant> roots
MaskDescriptionImpl[] masks
name
String[] parameters
List<TypeDescription> columns
ReaderEncryptionVariant[] variants
KeyProvider provider
ReaderEncryptionKey key
LocalKey[] localKeys
byte[] encryptedKey
Key decryptedKey
LocalKey footerKey
List<OrcProto.Stream> stripeStats
ReaderEncryptionVariant[] columnVariants
metadata:Stripe级别粒度的列统计信息
body
stripes
Index DATA
Row DATA
Footer
组成
streams:本Stripe包含的所有Stream,一个集合
Stream:各列的数据内容以Stream的形式按列存储
Kind Stream的类型
column 列ID
length:Stream的数据长度
streams列表
index Stream 元数据
Row Group Index
每个index Stream包含多个RowGoup
每个原始列的Index Stream都有RowIndexEntry与之对应
由orc writer控制,默认为10,000行一个生成row group
一个row group会给出Data Stream的位置以及该row group的统计信息
默认情况下index Stream不需要被读取,使用谓词下推或orc reader寻找特定行时才会读这部分
Bloom Filter Index
Bloom Filter Stream与Row Group Index Stream是在每个Stripe头上交错存储的
每个 Filter Stream 包含多个row group
row data Stream 元数据
ColumnEncoding columns:列编码信息,一个集合
StripeEncryptionVariant encryption :一个集合
列的所有 streams
encoding
对应的java类:StripePlanner
streams
Map<StreamName, StreamInformation> streams
List<StreamInformation> indexStreams
List<StreamInformation> dataStreams
OrcProto.ColumnEncoding[] encodings
ReaderEncryption encryption 这个对象与ReaderImpl的encriyption是同一个对象
head
魔数
问题
rowIndexStride 具体什么含义
stripeStatisticsLength用来做什么的
encryptStripeId:加密信息的位置??? 是用来做什么的
自由主题
0 条评论
下一页