QCon San Francisco 2026:Apache Iceberg 的未来
原题QCon San Francisco 2026: The Future of Apache Iceberg
读前速览
Daniel Weeks 介绍了 Apache Iceberg V4 对表元数据进行的重大重新设计,包括自适应元数据树、单文件提交、类型化列统计信息,以及对文件和向量数据类型的支持,从而实现亚秒级提交,并支持新的 AI 和搜索工作负载。
V4 引入自适应元数据树和单文件提交,实现亚秒级提交间隔。
V4 允许元数据树的根节点直接指向数据文件,无需创建和重写清单,因此将提交操作从 4 次 I/O 操作减少为单次元数据写入。这样一来,提交间隔可缩短至秒级甚至亚秒级,而 V3 建议的最短提交间隔为 2 分钟。
类型化列统计信息和新数据类型为 AI 与搜索工作负载提供支持。
V4 以结构化的类型化统计信息取代二进制列统计信息,从而改善投影和模式演进;同时新增对文件和向量数据类型的支持,并引入基于表达式的默认值和约束(检查、唯一性、主键),以支持更复杂的数据管理。
V4 元数据无法向后兼容旧版读取器。
升级过程中可以保留现有的 V3 元数据,但旧版读取器无法读取新的 V4 元数据格式,因此现有部署需要明确规划迁移和兼容性。
完整摘要
Apache Iceberg V4 对开放表格式规范进行了重大重构,旨在解决大型表的可扩展性限制,并支持新的数据管理能力。此次重新设计引入了自适应元数据树,允许元数据根节点直接指向数据文件,将提交操作从 4 次 I/O 操作减少为单次元数据写入。这使提交间隔可缩短至亚秒级,相比之下,V3 建议的最短提交间隔为 2 分钟。其他功能包括以类型化列统计信息取代二进制格式、基于表达式的默认值和约束(检查、唯一性、主键)、相对文件路径、列级更新,以及支持文件和向量数据类型,以满足 AI 和搜索工作负载的需求。Weeks 确认,V4 元数据无法向后兼容旧版读取器,但升级过程中可以保留现有的 V3 元数据。
Apache Iceberg V4 提议重新设计表元数据,以提升可扩展性并支持更频繁的写入,同时为数据管理和模式演进带来新功能。Apache Iceberg 的共同创始人、Databricks 技术团队成员 Daniel Weeks 在旧金山 QCon 大会上,就 Apache Iceberg 开放表格式规范的第四个版本进行了专题分享。Apache Iceberg V4 proposes a redesign of table metadata to improve scalability and support more frequent writes, alongside new capabilities for data management and schema evolution. Daniel Weeks, co-creator of Apache Iceberg and member of technical staff at Databricks, presented a session at QCon San Francisco on the fourth version of the Apache Iceberg open table format specification.
Iceberg V4 将解决管理超大型表时面临的局限,同时扩展格式以支持新的数据类型和工作负载。演讲者将这一新版本描述为对表格式的一次重大重新构想,而非渐进式升级。改动包括新的元数据树、更高效的提交、类型化列统计信息、相对文件路径,以及对文件和向量数据类型的支持。早期版本基本保留了大部分元数据结构,而 V4 则着眼于解决规模扩大后出现的问题,并为新的用例提供支持。Weeks 在旧金山对听众说:Iceberg V4 will address the limitations of managing very large tables while expanding the format to support new data types and workloads. The speaker described the new version as a major reimagining of the table format rather than an incremental step, with changes including a new metadata tree, more efficient commits, typed column statistics, relative file paths, and support for file and vector data types. While earlier versions left most of the metadata structure intact, V4 addresses problems that emerge at large scale and adds support for new use cases. Weeks told the audience in San Francisco:
V4 是对表格格式的一次重大重新构想。V3 及更早版本并非事事尽善尽美,因此我们现在借此机会解决一些重大问题,以应对数据集不断扩大以及新用例不断出现所带来的挑战。V4 is a major reimagining of a table format. We didn't get everything right in V3 and prior, so now we're taking the opportunity to fix some of the biggest things that are challenges as we scale up to even larger data sets and we bring on new use cases.
Apache Iceberg 是一种开放表格式,用于在不同的数据处理引擎之间管理大型分析数据集。它最初于 2017 年由 Netflix 开发,2018 年开源,并于 2020 年成为 Apache 顶级项目。开放表格式领域的主要替代方案包括:由 Databricks 创建、现为 Linux 基金会项目的 Delta Lake;最初由 Uber 开发的 Apache Hudi;以及源自 Flink 社区、并在面向流处理的工作负载中得到广泛采用的 Apache Paimon。不过,互操作工具正日益模糊它们之间的界限。Apache Iceberg is an open table format for managing large analytical datasets across different data processing engines. Originally developed at Netflix in 2017, it was open-sourced in 2018 and became an Apache top-level project in 2020. The main alternatives among open table formats are Delta Lake, created by Databricks and now a Linux Foundation project, Apache Hudi, originally developed at Uber, and Apache Paimon, which grew out of the Flink community and gained adoption for streaming-oriented workloads. However, interoperability tools are increasingly blurring the lines between them.
在他的演讲中,Weeks 介绍了拟议中的 Iceberg V4 变更涉及的三个方面:元数据与可扩展性,包括自适应元数据树、单文件提交、改进后的列统计信息、相对路径和列级更新;新的表功能,例如基于表达式的默认值和约束;以及新的数据类型,尤其是文件类型和向量类型,它们支持 AI 和搜索等额外工作负载。谈到如何加快提交时,Weeks 解释道:In his talk, Weeks covered three areas of the proposed Iceberg V4 changes: metadata and scalability, including the Adaptive Metadata Tree, single-file commits, improved column statistics, relative paths, and column-level updates; new table features, such as expression-based default values and constraints; and new data types, particularly file and vector types, which support additional workloads such as AI and search. Regarding faster commits, Weeks explained:
这使我们能够处理数据流速度快得多的用例。我们可以按秒级甚至亚秒级提交,而目前我们通常建议提交间隔不要短于 2 分钟。This gets us into use cases where we can stream data much faster. We can do commits at the 2nd level or subsecond level, where right now we largely recommend that you don't do commits under 2 minutes.
在 V3 中,添加数据文件至少需要执行四次 I/O 操作,包括创建和重写清单。V4 简化了这一流程,允许元数据树的根节点直接指向数据文件,从而将操作缩减为一次元数据写入。据 Weeks 称,这有望实现每秒提交一次,甚至以亚秒级间隔提交;而目前的建议是两次提交之间至少间隔两分钟。2024 年推出的 Iceberg V3 新增了删除向量、行血缘、新数据类型、加密和默认值。In V3, adding a data file requires at least four I/O operations, including manifest creation and rewriting. V4 simplifies this process by allowing the metadata tree's root to point directly to data files, reducing the operation to a single metadata write. According to Weeks, this could enable commits every second or even at subsecond intervals, compared with the current recommendation of at least two minutes between commits. Iceberg V3, introduced in 2024, added deletion vectors, row lineage, new data types, encryption, and default values.
V4 用结构化、类型化的统计信息取代了 V3 的二进制列统计信息,从而改进了投影和架构演进。此外,V4 引入了基于表达式的默认值、检查约束、唯一约束和主键约束,以及仅用于统计信息的字段。这些字段支持分区、排序和筛选,而无需存储额外数据。V4 还会跟踪约束的验证状态,以便引擎判断是否需要进一步检查。V4 replaces V3's binary column statistics with structured, typed statistics, improving projection and schema evolution. Furthermore, V4 introduces expression-based default values, check, unique, and primary key constraints, and statistics-only fields that support partitioning, sorting, and filtering without storing additional data. It will also track constraint validation status, allowing engines to determine when further checks are needed.
8 月,Weeks 在 Apache Iceberg 开发者邮件列表上发起了 V4 范围的初步讨论。Steven Wu 建议添加单调递增的快照时间戳和行级更新时间戳,而 Manu Zhang 则讨论了高效的列更新以及移除等值删除。In August, Weeks started an initial V4 scope discussion on the Apache Iceberg developer mailing list, with Steven Wu suggesting adding monotonic snapshot and row-level update timestamps, while Manu Zhang discussed efficient column updates and the removal of equality deletes.
在问答环节中,Weeks 明确确认,V4 元数据将无法与旧版读取器向后兼容。升级期间可以保留现有的 V3 元数据,但旧版读取器无法读取新的表示形式。During the Q&A, Weeks explicitly confirmed that V4 metadata will not be backward compatible with older readers. Existing V3 metadata can remain in place during an upgrade, but older readers cannot consume the new representation.