Flink_YARN 上资源申请流程

 

Base on Flink 1.10.1

 

  Flink 托管给Yarn 是一个非常常用的形式,下面我们通过官网给出的流程图,了解下 Flink On Yarn 的任务执行流程。

 

前提 :

首先,我们如果能让我们的任务在Yarn 上托管执行,我们是需要设置一些环境变量 :

The YARN client needs to access the Hadoop configuration to connect to the YARN resource manager and HDFS. It determines the Hadoop configuration using the following strategy:

  • Test if YARN_CONF_DIRHADOOP_CONF_DIR or HADOOP_CONF_PATH are set (in that order). If one of these variables is set, it is used to read the configuration.
  • If the above strategy fails (this should not be the case in a correct YARN setup), the client is using the HADOOP_HOME environment variable. If it is set, the client tries to access $HADOOP_HOME/etc/hadoop (Hadoop 2) and $HADOOP_HOME/conf (Hadoop 1).

 

 

 

运行流程

结合官网给出的流程图 

https://ci.apache.org/projects/flink/flink-docs-release-1.10/ops/deployment/yarn_setup.html

我们来讲解下 Flink ON YARN 的执行流程

 

1.上传依赖和Config文件

2.请求资源,申请AppMaster容器

3.分配(allocate) AppMaster 容器 

容器内部:

 启动的Flink  JobManager 和 Yarn App Master 在同一个 Container 中

两种模式:

Yarn 上分为 Yarn Session 与 Yarn Single Job 两种方式

其中Yarn Session 相当于 JobManger 进行了复用,而Single Job 相当于每个 Job 都去申请 AppMaster 和 JobManager

4.分配Yarn Container , 其中 Flink TaskManager 分配在 Container 中

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值