Flink 命令

Flink 命令:

提交任务:

./bin/flink run -c it.bigdata.flink.study.SteamWordCount -p 1 /root/jar/maven_flink-1.0-SNAPSHOT-jar-with-dependencies.jar --host 10.18.35.155 --port 777

命令行停止任务命令:./bin/flink cancel jobID

查看正在运行job:./bin/flink list

查看所有任务:./bin/flink list -a

Flink on yarn:

Session-cluster 模式:

yarn单独申请一块空间,资源永远保持不变。适合规模小,执行时间短作业

启动yarn-session: ./yarn-session.sh -n 2 -s 2 -jm 1024 -tm 1024 -nm test -d

Per-Job-Cluster模式

一个job对应一个集群,每个作业根据自身情况,单独向yarn申请资源,作业之间相互不影响,适合规模大长时间运行作业。

启动: 不启动 yarn-ssion

./bin/flink run -m yarn-cluster -c it.bigdata.flink.study.SteamWordCount -p 1 /root/jar/maven_flink-1.0-SNAPSHOT-jar-with-dependencies.jar --host 192.168.0.20 --port 777

author@nohert
原文地址:https://www.cnblogs.com/gzgBlog/p/14928127.html