flink1.13安装配置
- 1 下载解压
- 2 配置hadoop_classpath
- 3 添加依赖 common-cli、hadoop…
- 4 启动、测试
flink on yarn三种部署模式启动命令
per job
# flink旧版本
./bin/flink run -m yarn-cluster -yjm 1024 -ytm 1024 -yqu root.up ./examples/streaming/TopSpeedWindowing.jar
./examples/batch/WordCount.jar \
-input hdfs://mycluster/tmp/input/ \
-output hdfs://mycluster/tmp/output2
# flink1.13
./bin/flink run -t yarn-per-job -d \
-Djobmanager.memory.process.size=1024m \
-Dtaskmanager.memory.process.size=1024m \
-Dtaskmanager.numberOfTaskSlots=1 \
-Dparallelism.default=1 \
-Dyarn.application.name="MyFlinkApp" \
-Dyarn.application.queue=myQueue ./examples/streaming/TopSpeedWindowing.jar
session
# 启动
./bin/yarn-session.sh --detached -Dyarn.application.queue root.xxx
# 执行任务
./bin/flink run -t yarn-session \
-Dyarn.application.id=application_XXXX_YY \
./examples/streaming/TopSpeedWindowing.jar
# close
echo "stop" | ./bin/yarn-session.sh -id application_1632098537301_0003
application-mode
bin/flink run-application -t yarn-application \
-Djobmanager.memory.process.size=1024m \
-Dtaskmanager.memory.process.size=1024m \
-Dtaskmanager.numberOfTaskSlots=1 \
-Dparallelism.default=1 \
-Dyarn.application.name="MyFlinkApp" \
-Dyarn.application.queue=myQueue ./examples/streaming/TopSpeedWindowing.jar