快捷搜索:  汽车  科技

使用flinkhudi构建流式数据湖:Apache Hudi 新一代流式数据湖平台

使用flinkhudi构建流式数据湖:Apache Hudi 新一代流式数据湖平台Hudi 已经包含了一些有助于构建缓存层(直写或仅由增量查询填充)的设计元素,它将支持多租户,可以缓存最新文件分片的预合并镜像,并与时间线保持一致。Hudi 时间线可用于简单地与缓存策略通信,就像我们如何执行表间服务协调一样。从历史上看,缓存更接近查询引擎或通过中间内存文件系统完成。通过将缓存层与 Hudi 等事务性的湖存储更紧密地集成在一起,所有查询引擎都能够共享和分摊缓存成本,同时还支持更新 / 删除。我们期待在社区其他成员的贡献下,为湖建立一个可以跨所有主要引擎工作的缓冲池。湖缓存如今,数据湖在更快的写入和出色的查询性能之间存在一个基本的权衡。更快的写入通常涉及写入较小的文件(然后将它们聚簇)或记录增量(然后在读取时合并)。虽然这已经提供了良好的性能,但追求出色的查询性能通常需要在湖存储上打开更少数量的文件 / 对象,并且可能需要预先实现基本文件和增量日志之间的合并。毕竟,大多数数据

展望未来,我们希望为增强多表写入器 [51] 实用程序做出贡献,该实用程序可以在单个大型 Spark 应用程序中摄取整个 Kafka 集群。为了促进端到端的复杂增量管道向前发展,我们计划努力增强由多源流(而不是今天的单源流)触发的 delta streamer 实用程序及其 SQL 转换器,并大规模解锁物化视图。我们希望带来一系列有用的转换器来执行处理或数据监控,并扩展对 Hudi 表中数据输出到其他外部接收器的支持。最后,我们希望将 FlinkStreamer 和 DeltaStreamer 实用程序合并为一个可跨引擎使用的内聚实用程序。我们不断改进现有源(例如支持 DFS 源的并行 listing)并添加新的源(例如基于 DFS 的 S3 事件源)

时间线元数据服务

在湖存储上保存和提供表元数据是可扩展的,但与可扩展的元数据服务器的 RPC 相比,其性能可能要低得多。在大多数云仓库内部,其元数据层都建立在外部数据库之上(例如 Snowflake 使用 FoundationDB[52])。Hudi 还提供了一个元数据服务器,称为“时间线服务器”(Timeline server),它为 Hudi 表的元数据提供了一个可替代的后备存储。

目前,时间线服务器内嵌在 Hudi 写入器进程中运行,在写入过程中从本地 RocksDB 存储 /Javalin[53] REST API 获取文件列表,无需重复在云存储上执行“listing”操作。鉴于自 0.6.0 版本以来我们已将此作为默认选项进行,我们正在考虑拆分时间线服务器进行独立部署以支持水平扩展、数据库 / 表映射、安全性,以将其转变为功能完备的高性能的湖元数据存储。

使用flinkhudi构建流式数据湖:Apache Hudi 新一代流式数据湖平台(1)

湖缓存

如今,数据湖在更快的写入和出色的查询性能之间存在一个基本的权衡。更快的写入通常涉及写入较小的文件(然后将它们聚簇)或记录增量(然后在读取时合并)。虽然这已经提供了良好的性能,但追求出色的查询性能通常需要在湖存储上打开更少数量的文件 / 对象,并且可能需要预先实现基本文件和增量日志之间的合并。毕竟,大多数数据库都使用缓冲池 [54] 或块缓存 [55] 来分摊访问存储的成本。

Hudi 已经包含了一些有助于构建缓存层(直写或仅由增量查询填充)的设计元素,它将支持多租户,可以缓存最新文件分片的预合并镜像,并与时间线保持一致。Hudi 时间线可用于简单地与缓存策略通信,就像我们如何执行表间服务协调一样。从历史上看,缓存更接近查询引擎或通过中间内存文件系统完成。通过将缓存层与 Hudi 等事务性的湖存储更紧密地集成在一起,所有查询引擎都能够共享和分摊缓存成本,同时还支持更新 / 删除。我们期待在社区其他成员的贡献下,为湖建立一个可以跨所有主要引擎工作的缓冲池。

使用flinkhudi构建流式数据湖:Apache Hudi 新一代流式数据湖平台(2)

写在最后

这篇博客文章描绘了 Apache Hudi 的完整愿景。未来几周 / 几个月内我们计划发表博客文章深入讨论堆栈中的每一层,并沿着这些方向对我们的文档进行的大规模重构,感兴趣的用户和读者可以期待一下。

我们认为当前围绕表格式所做的努力仅仅是消除了数据湖存储 / 查询平面中存在了十年的瓶颈,这些问题已经在 Big Query/Snowflake 等云仓库中得到了很好的解决。我们想强调的是,Hudi 的愿景要大得多,在技术上也更具挑战性。作为这个领域中的一员,我们在思考许多更深刻的、开放式的问题以及怎样解决这些问题,希望在兼顾扩展性与简洁性的同时将流处理和数据湖结合起来。我们将继续把社区放在首位,与社区伙伴共同构建 / 解决这些难题。如果这些挑战让你感到兴奋,并且你也想为那个激动人心的未来而努力,请加入我们 [56]。

[1]:https://www.oreilly.com/content/ubers-case-for-incremental-processing-on-hadoop/

[2] https://eng.uber.com/uber-big-data-platform/

[3] https://flink.apache.org/blog/

[4]https://www.confluent.io/blog/every-company-is-becoming-software/

[5] https://flink.apache.org/2021/03/11/batch-execution-mode.html

[6] https://hudi.apache.org/docs/powered_by.html

[7] https://eng.uber.com/hoodie/

[8] https://github.com/apache/iceberg/pull/1862

[9]https://blogs.apache.org/foundation/entry/the-apache-software-foundation-announces64

[10] http://hudi.apache.org/docs/powered_by.html

[11] https://github.com/apache/hudi/graphs/contributors

[12]https://cloud.google.com/blog/products/data-analytics/getting-started-with-new-table-formats-on-dataproc

[13]https://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying

[14] https://www.infoq.com/presentations/streaming-databases/

[15] https://kafka.apache.org/

[16] https://eng.uber.com/apache-hudi-graduation/

[17]https://databricks.com/blog/2020/01/30/what-is-a-data-lakehouse.html

[18] http://cidrdb.org/cidr2021/papers/cidr2021_paper17.pdf

[19] http://parquet.apache.org/

[20] https://orc.apache.org/

[21]https://hadoop.apache.org/docs/stable/api/org/apache/hadoop/fs/FileSystem.html

[22]https://www.alluxio.io/blog/building-high-performance-data-lake-using-apache-hudi-and-alluxio-at-t3go/

[23]https://github.com/apache/hudi/blob/9d2a65a6a6ff9add81411147f1cddd03f7c08e6c/hudi-common/src/main/java/org/apache/hudi/common/fs/HoodieWrapperFileSystem.java

[24]https://azure.microsoft.com/en-us/updates/append-blob-support-in-azure-data-lake-storage-is-now-generally-available/

[25] http://avro.apache.org/

[26] https://github.com/apache/hudi/pull/3228

[27]https://docs.confluent.io/platform/current/schema-registry/avro.html

[28]https://hbase.apache.org/2.0/devapidocs/org/apache/hadoop/hbase/io/hfile/HFile.html

[29] http://hudi.apache.org/blog/hudi-indexing-mechanisms/

[30]https://cwiki.apache.org/confluence/display/HUDI/RFC-27 Data skipping index to improve query performance

[31] https://github.com/apache/hudi/pull/2487

[32] https://issues.apache.org/jira/browse/HUDI-1295

[33]https://cwiki.apache.org/confluence/display/HUDI/RFC - 22 : Snapshot Isolation using Optimistic Concurrency Control for multi-writers

[34]https://cwiki..org/confluence/display/HUDI/RFC - 22 : Snapshot Isolation using Optimistic Concurrency Control for multi-writers#RFC22:SnapshotIsolationusingOptimisticConcurrencyControlformultiwriters-FutureWork(LockFree-ishConcurrencyControl)

[35]http://hudi.apache.apacheorg/blog/hudi-file-sizing/

[36]https://rocksdb.org/

[37]http://hudi.apache.org/blog/hudi-key-generators/

[38]https://www.oreilly.com/radar/the-world-beyond-batch-streaming-101/

[39]https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/datastream/event-time/generating_watermarks/

[40] https://github.com/apache/hudi/pull/3306

[41] https://github.com/apache/hudi/pull/3247

[42] https://prestodb.io/blog/2021/02/04/raptorx

[43] https://trino.io/docs/current/connector/hive-caching.html

[44] https://debezium.io/

[45]http://hudi.apache.org/blog/employing-right-configurations-for-hudi-cleaner/

[46] http://hudi.apache.org/blog/hudi-clustering-intro/

[47] https://github.com/apache/hudi/pull/3233

[48]https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=181307144

[49] http://hudi.apache.org/blog/hudi-meets-aws-emr-and-aws-dms/

[50] http://hudi.apache.org/blog/exporting-hudi-datasets/

[51] http://hudi.apache.org/blog/ingest-multiple-tables-using-hudi/

[52]https://www.snowflake.com/blog/how-foundationdb-powers-snowflake-metadata-forward/

[53] https://javalin.io/

[54] https://dev.mysql.com/doc/refman/8.0/en/innodb-buffer-pool.html

[55] https://github.com/facebook/rocksdb/wiki/Block-Cache

[56] http://hudi.apache.org/community.html

译者介绍

杨华(vinoyang)Apache Hudi PMC & Committer. T3 出行大数据平台技术负责人。

原文链接:

http://hudi.apache.org/blog/2021/07/21/streaming-data-lake-platform

猜您喜欢: