提交job的命令,./bin/flink run-application -t yarn-application ... 和 ./bin/flink run -m yarn-cluster ...

classic Classic list List threaded Threaded
4 messages Options
lp
Reply | Threaded
Open this post in threaded view
|

提交job的命令,./bin/flink run-application -t yarn-application ... 和 ./bin/flink run -m yarn-cluster ...

lp
如题,在 ./flink --help中看到提交job的命令有两个相似的,貌似都会将jobManager发送yarn
node上去之行,但不明白他们区别,官网也未找到他们的区别,请帮忙解释下他们之间的区别?



--
Sent from: http://apache-flink.147419.n8.nabble.com/
lp
Reply | Threaded
Open this post in threaded view
|

Re: 提交job的命令,./bin/flink run-application -t yarn-application ... 和 ./bin/flink run -m yarn-cluster ...

lp
应该说是否:1.11和1.12这里这两种提交方式 是不是一样的,只不过命令有了变化?

官网中的摘录如下:

flink-1.11:
Run a single Flink job on YARN

Example:
./bin/flink run -m yarn-cluster ./examples/batch/WordCount.jar

------------------------------------------------------
flink-1.12:
Per-Job Cluster Mode

Example:
./bin/flink run -t yarn-per-job --detached
./examples/streaming/TopSpeedWindowing.jar



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: 提交job的命令,./bin/flink run-application -t yarn-application ... 和 ./bin/flink run -m yarn-cluster ...

Yang Wang
-m yarn-cluster和-t yarn-per-job都是可以用来提交per-job任务到Yarn集群的
只是背后实现的CLI不一样而已,前者FlinkYarnSessionCLI是以前的方式
后者是在1.10引入的一个更加通用的方式,可以和K8s、Standalone等保持一致

另外,还有一个差异是,-m yarn-cluster是可以支持-yq -ynm等这些CLI参数的
-t yarn-per-job只能通过-D的方式来设置


Best,
Yang

lp <[hidden email]> 于2021年1月29日周五 下午3:00写道:

> 应该说是否:1.11和1.12这里这两种提交方式 是不是一样的,只不过命令有了变化?
>
> 官网中的摘录如下:
>
> flink-1.11:
> Run a single Flink job on YARN
>
> Example:
> ./bin/flink run -m yarn-cluster ./examples/batch/WordCount.jar
>
> ------------------------------------------------------
> flink-1.12:
> Per-Job Cluster Mode
>
> Example:
> ./bin/flink run -t yarn-per-job --detached
> ./examples/streaming/TopSpeedWindowing.jar
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/
>
Reply | Threaded
Open this post in threaded view
|

Re:提交job的命令,./bin/flink run-application -t yarn-application ... 和 ./bin/flink run -m yarn-cluster ...

゛无邪
In reply to this post by lp
-t是flink1.12出来的,通过-t指定提交模式后,yarn相关参数要通过 -D来指定,例如 -D yarn.application.name

















在 2021-01-29 12:52:41,"lp" <[hidden email]> 写道:
>如题,在 ./flink --help中看到提交job的命令有两个相似的,貌似都会将jobManager发送yarn
>node上去之行,但不明白他们区别,官网也未找到他们的区别,请帮忙解释下他们之间的区别?
>
>
>
>--
>Sent from: http://apache-flink.147419.n8.nabble.com/