local模式
* 本地运行,不需要集群环境
* IDE开发时,local模式方便本地测试
standalone
* 需要搭建flink集群
* 提交命令flink run -m artemis-02:6123 -c com.test.WordCount2 ./Flink.jar hdfs:/
/artemis-02:9000/tmp/lvxw/tmp/logs/words hdfs://artemis-02:9000/tmp/lvxw/tmp/out
flink on yarn
*
注:该模式,重新解压一个flink(例如yarn-client),不做任何配置(否则RM_WEBUI无法跳转)
*
在yarn创建集群
* 启动flink集群yarn-client/bin/yarn-session.sh -n 2 -jm 1024 -tm 1024 yarn
application -kill application_xxx_xxx (在yarn中flink退出集群)
* 提交任务到集群yarn-client/bin/flink run -m xxx:xxx -c com.test.WordCount2 .
/Flink.jar hdfs://artemis-02:9000/tmp/lvxw/tmp/logs/words hdfs://artemis-02:9000
/tmp/lvxw/tmp/out
*
直接运行在yarn上
* 提交任务/home/hadoop/soft/flink/bin/flink run -m yarn-cluster -yn 2 -yjm 1024
-ytm1024 -c com.test.WordCount2 ./Flink.jar hdfs://artemis-02:9000/tmp/lvxw/tmp
/logs/words hdfs://artemis-02:9000/tmp/lvxw/tmp/out
热门工具 换一换