入坑Flink - Flink On YARN

将flink脚本提交到Yarn集群有2种方式

1、Start a long-running Flink cluster on YARN

1、启动FlinkCluster:

./bin/yarn-session.sh -jm 1024m -tm 4096m

2、提交flink程序到FlinkCluster
./bin/flink run ./examples/batch/WordCount.jar \
       --input hdfs:///..../LICENSE-2.0.txt --output hdfs:///.../wordcount-result.txt

2、Run a Flink job on YARN

提交一个单独的任务到Yarn

./bin/flink run -m yarn-cluster -yn 1 -yjm 1024 -ytm 1024   -c com.**.** /jar包路径/jar包名.jar

你可能感兴趣的:(flink)