NetEase / lakehouse-benchmark-ingestion

A ingestion tool for Lakehouse benchmark

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

总览

欢迎使用lakehouse-benchmark-ingestion。lakehouse-benchmark-ingestion 是网易开源的数据湖性能基准测试 lakehouse-benchmark 项目下的数据同步工具,该工具基于 Flink-CDC 实现,能够将数据库中的数据实时同步到数据湖。

快速开始

  1. 通过命令 wget https://github.com/NetEase/lakehouse-benchmark-ingestion/releases/download/beta-1.0-arctic-0.4/lakehouse_benchmark_ingestion.tar.gz 下载项目相关的 release 包,并通过tar -zxvf lakehouse_benchmark_ingestion.tar.gz命令解压得到 lakehouse-benchmark-ingestion-1.0-SNAPSHOT.jar 和 conf 目录
  2. 修改 conf 目录下的 ingestion-conf.yaml ,填写配置项信息
  3. 通过java -cp lakehouse-benchmark-ingestion-1.0-SNAPSHOT.jar com.netease.arctic.benchmark.ingestion.MainRunner -confDir [confDir] -sinkType [arctic/iceberg/hudi] -sinkDatabase [dbName]命令启动数据同步工具
  4. 通过localhost:8081打开 Flink Web UI ,观察数据同步的情况

除了快速开始部分通过 release 包启动 lakehouse-benchmark-ingestion 工具,您也可以选择从源码进行构建或者在 Docker 模式下进行部署的方式。

从源码构建

  1. 下载项目代码 git clone https://github.com/NetEase/lakehouse-benchmark-ingestion.git
  2. 参考源码构建相关说明部分,构建项目所需的依赖
  3. 通过命令mvn clean install -DskipTests编译项目。进入 target 目录,通过tar -zxvf lakehouse_benchmark_ingestion.tar.gz命令解压得到 lakehouse-benchmark-ingestion-1.0-SNAPSHOT.jar 和 conf 目录
  4. 修改 conf 目录下的 ingestion-conf.yaml ,填写配置项信息
  5. 通过java -cp lakehouse-benchmark-ingestion-1.0-SNAPSHOT.jar com.netease.arctic.benchmark.ingestion.MainRunner -confDir [confDir] -sinkType [arctic/iceberg/hudi] -sinkDatabase [dbName]命令启动数据同步工具
  6. 通过localhost:8081打开 Flink Web UI ,观察数据同步的情况

Docker模式下部署

请参考 lakehouse-benchmark 项目的 Docker 部署文档

支持的参数

命令行参数

参数项 是否必须 默认值 描述
confDir (none) 配置文件 ingestion-conf.yaml 所在目录的绝对路径。基于快速开始的步骤,confDir为解压后conf目录所在的路径
sinkType (none) 目标端数据湖 Format 的类型,支持 Arctic/Iceberg/Hudi
sinkDatabase (none) 目标端数据库的名称
restPort 8081 Flink Web UI的端口

配置文件参数

以下参数均可以通过 conf/ingestion-conf.yaml 文件进行配置。

参数项 是否必须 默认值 描述
source.type (none) 源端数据库的类型,目前仅支持 MySQL
source.username (none) 源端数据库用户名
source.password (none) 源端数据库密码
source.hostname (none) 源端数据库地址
source.port (none) 源端数据库端口
source.table.name * 指定需要同步的表名称,支持指定多张表,默认情况下同步整个数据库
source.scan.startup.mode initial MySQL CDC connector 消费 binlog 时的启动模式,支持 initial/latest-offset
source.server.timezone (none) MySQL数据库服务器的会话时区
source.parallelism 4 读取源端数据时的任务并行度
hadoop.user.name (none) 用于设置 HADOOP_USER_NAME 的值

Arctic相关

参数项 是否必须 默认值 描述
arctic.metastore.url (none) Arctic metastore 的 URL 地址
arctic.optimize.enable true 是否开启Arctic Optimize
arctic.optimize.group.name default Arctic Optimizer 资源组
arctic.optimize.table.quota (none) 指定 Arctic 表占用 Optimizer 资源的配额,支持指定多张表,以Map形式传入
arctic.write.upsert.enable false 是否开启upsert功能
arctic.sink.parallelism 4 Arctic Writer的并行度

Iceberg相关

参数项 是否必须 默认值 描述
iceberg.uri (none) Hive metastore 的thrift URI
iceberg.warehouse (none) Hive warehouse 的地址
iceberg.catalog-type hive Iceberg catalog 的类型,支持 hive/hadoop
iceberg.write.upsert.enable false 是否开启upsert功能
iceberg.sink.parallelism 4 Iceberg Writer的并行度

Hudi相关

参数项 是否必须 默认值 描述
hudi.catalog.path (none) Hudi Catalog 的地址
hudi.hive_sync.enable true 是否开启 hive 同步功能
hudi.hive_sync.metastore.uris (none) Hive Metastore URL,当开启 hive 同步功能时需要填写该参数
hudi.table.type MERGE_ON_READ 表操作的类型,支持 MERGE_ON_READ/COPY_ON_WRITE
hudi.read.tasks 4 读算子的并行度
hudi.compaction.tasks 4 在线 compaction 的并行度
hudi.write.tasks 4 写算子的并行度

已支持的数据库与数据湖Format

源端数据库

  1. MySQL

目标端数据湖Format

  1. Arctic
  2. Iceberg
  3. Hudi

源码构建相关说明

  • 本项目使用的 arctic-flink-runtime-1.14 依赖需要基于Arctic工程进行源码编译,请通过命令git clone https://github.com/NetEase/arctic.git -b 0.4.x下载 Arctic 工程的代码并切换到 0.4.x 分支,执行命令mvn clean install -DskipTests -pl '!trino'进行构建
  • 本项目使用的 hudi-flink1.14-bundle_2.12 依赖需要基于Hudi工程进行源码编译,请通过命令git clone https://github.com/apache/hudi.git -b release-0.11.1下载 Hudi 工程的代码并切换到 release-0.11.1 ,执行命令mvn clean install -DskipTests -Dflink1.14 -Dscala-2.12进行构建

项目依赖的版本信息

Maven依赖项 版本信息
Flink 1.14.6
Flink-CDC 2.3.0
Hadoop 2.9.2
Hive 2.1.1
Arctic 0.4.x
Iceberg 0.14.0
Hudi 0.11.1

About

A ingestion tool for Lakehouse benchmark


Languages

Language:Java 99.4%Language:Dockerfile 0.6%