当前位置:网站首页>数据湖(八):Iceberg数据存储格式
数据湖(八):Iceberg数据存储格式
2022-07-06 12:44:00 【51CTO】
Iceberg数据存储格式
一、Iceberg术语
- data files(数据文件):
数据文件是Apache Iceberg表真实存储数据的文件,一般是在表的数据存储目录的data目录下,如果我们的文件格式选择的是parquet,那么文件是以“.parquet”结尾,例如:
00000-0-root_20211212192602_8036d31b-9598-4e30-8e67-ce6c39f034da-job_1639237002345_0025-00001.parquet 就是一个数据文件。
Iceberg每次更新会产生多个数据文件(data files)。
- Snapshot(表快照):
快照代表一张表在某个时刻的状态。每个快照里面会列出表在某个时刻的所有 data files 列表。data files是存储在不同的manifest files里面,manifest files是存储在一个Manifest list文件里面,而一个Manifest list文件代表一个快照。
- Manifest list(清单列表):
manifest list是一个元数据文件,它列出构建表快照(Snapshot)的清单(Manifest file)。这个元数据文件中存储的是Manifest file列表,每个Manifest file占据一行。每行中存储了Manifest file的路径、其存储的数据文件(data files)的分区范围,增加了几个数文件、删除了几个数据文件等信息,这些信息可以用来在查询时提供过滤,加快速度。
- Manifest file(清单文件):
Manifest file也是一个元数据文件,它列出组成快照(snapshot)的数据文件(data files)的列表信息。每行都是每个数据文件的详细描述,包括数据文件的状态、文件路径、分区信息、列级别的统计信息(比如每列的最大最小值、空值数等)、文件的大小以及文件里面数据行数等信息。其中列级别的统计信息可以在扫描表数据时过滤掉不必要的文件。
Manifest file是以avro格式进行存储的,以“.avro”后缀结尾,例如:8138fce4-40f7-41d7-82a5-922274d2abba-m0.avro。
二、表格式Table Format
Apache Iceberg作为一款数据湖解决方案,是一种用于大型分析数据集的开放表格式(Table Format),表格式可以理解为元数据及数据文件的一种组织方式。Iceberg底层数据存储可以对接HDFS,S3文件系统,并支持多种文件格式,处于计算框架(Spark、Flink)之下,数据文件之上。
下面介绍下Iceberg底层文件组织方式,下图是Iceberg中表格式,s0、s1代表的是表Snapshot信息,每个表示当前操作的一个快照,每次commit都会生成一个快照Snapshot,每个Snapshot快照对应一个manifest list 元数据文件,每个manifest list 中包含多个Manifest元数据文件,manifest中记录了当前操作生成数据所对应的文件地址,也就是data file的地址。
基于snapshot的管理方式,Iceberg能够获取表历史版本数据、对表增量读取操作,data files存储支持不同的文件格式,目前支持parquet、ORC、Avro格式。
关于Iceberg表数据底层组织详细信息,可关注后面得文章,会详细讲解的。
边栏推荐
- Extraction rules and test objectives of performance test points
- Reinforcement learning - learning notes 5 | alphago
- 小孩子学什么编程?
- 【DSP】【第一篇】开始DSP学习
- Leetcode hot topic Hot 100 day 32: "minimum coverage substring"
- [DIY]如何制作一款個性的收音機
- [200 opencv routines] 220 Mosaic the image
- OAI 5G NR+USRP B210安装搭建
- Boder radius has four values, and boder radius exceeds four values
- 过程化sql在定义变量上与c语言中的变量定义有什么区别
猜你喜欢
Redis insert data garbled solution
2022 Guangdong Provincial Safety Officer C certificate third batch (full-time safety production management personnel) simulation examination and Guangdong Provincial Safety Officer C certificate third
OAI 5G NR+USRP B210安装搭建
What is the problem with the SQL group by statement
性能测试过程和计划
Rhcsa Road
Comprehensive evaluation and recommendation of the most comprehensive knowledge base management tools in the whole network: flowus, baklib, jiandaoyun, ones wiki, pingcode, seed, mebox, Yifang cloud,
Intel 48 core new Xeon run point exposure: unexpected results against AMD zen3 in 3D cache
[weekly pit] positive integer factorization prime factor + [solution] calculate the sum of prime numbers within 100
知识图谱构建流程步骤详解
随机推荐
[asp.net core] set the format of Web API response data -- formatfilter feature
Spiral square PTA
Spark SQL chasing Wife Series (initial understanding)
小孩子學什麼編程?
##无yum源安装spug监控
Mécanisme de fonctionnement et de mise à jour de [Widget Wechat]
Infrared thermometer based on STM32 single chip microcomputer (with face detection)
Yyds dry goods count re comb this of arrow function
Regular expression collection
Laravel notes - add the function of locking accounts after 5 login failures in user-defined login (improve system security)
知识图谱构建流程步骤详解
[diy] how to make a personalized radio
Core principles of video games
2022 portal crane driver registration examination and portal crane driver examination materials
Leetcode question 448 Find all missing numbers in the array
2110 summary of knowledge points and common problems in redis class
1_ Introduction to go language
(工作记录)2020年3月11日至2021年3月15日
过程化sql在定义变量上与c语言中的变量定义有什么区别
使用.Net分析.Net达人挑战赛参与情况