Iceberg从入门到精通系列之六:Flink集成Iceberg
- 一、下载Flink
- 二、解压Flink 安装包
- 三、配置环境变量
- 四、激活环境变量
- 五、下载Iceberg flink jar包
- 六、部署Iceberg flink jar包
- 七、修改flink配置
- 八、启动flink
- 九、启动flink sql client
一、下载Flink
下载Flink:
二、解压Flink 安装包
tar -zxvf flink-1.17.1-bin-scala_2.12.tgz -C /moudle/
三、配置环境变量
vim /etc/profile.d/flink_env.sh
export HADOOP_HOME=/opt/module/hadoop-3.1.3
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
#Flink 需要
export FLINK_HOME=/module/flink-1.17.1
export HADOOP_CLASSPATH = `hadoop classpath`
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
四、激活环境变量
source /etc/profile.d/flink_env.sh
五、下载Iceberg flink jar包
下载Iceberg flink jar包:iceberg-flink-runtime-1.17-1.3.0.jar
六、部署Iceberg flink jar包
cp iceberg-flink-runtime-1.17-1.3.0.jar /module/flink-1.17.1/lib/
七、修改flink配置
修改配置文件flink-conf.yaml
classloader.check-leaked-classloader: false
taskmanager.numberOfTaskSlots: 4
state.backed: rocksdb
execution.checkpointing.interval: 30000
state.checkpoints.dir: hdfs://hadoop1:8020/ckps
state.backed.incremental: true
local模式
修改workers
vim /module/flink-1.17.1/conf/workers
localhost
localhost
localhost
八、启动flink
bin/start-cluster.sh
九、启动flink sql client
bin/sql-client.sh embedded
至此FLink成功集成Iceberg