什么是Spark中的yarn-client模式? [英] What is yarn-client mode in Spark?

查看:160
本文介绍了什么是Spark中的yarn-client模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apache Spark最近将版本更新为0.8.1,其中提供了yarn-client模式.我的问题是,yarn-client模式的真正含义是什么?在文档中说:

Apache Spark has recently updated the version to 0.8.1, in which yarn-client mode is available. My question is, what does yarn-client mode really mean? In the documentation it says:

在yarn-client模式下,该应用程序将在本地启动.就像在本地/Mesos/独立模式下运行应用程序或spark-shell一样.启动方法也与它们类似,只需确保当您需要指定主URL时,改用"yarn-client"

With yarn-client mode, the application will be launched locally. Just like running application or spark-shell on Local / Mesos / Standalone mode. The launch method is also the similar with them, just make sure that when you need to specify a master url, use "yarn-client" instead

在本地启动"是什么意思?在哪里?在Spark集群上吗?
与独立纱线模式有什么区别?

What does it mean "launched locally"? Locally where? On the Spark cluster?
What is the specific difference from the yarn-standalone mode?

推荐答案

Spark应用程序由一个驱动程序和一个或多个执行程序组成.驱动程序是主程序(在其中实例化SparkContext),该主程序协调执行程序以运行Spark应用程序.执行程序运行驱动程序分配的任务.

A Spark application consists of a driver and one or many executors. The driver program is the main program (where you instantiate SparkContext), which coordinates the executors to run the Spark application. The executors run tasks assigned by the driver.

YARN应用程序具有以下角色:纱线客户端,纱线应用程序主文件和在节点管理器上运行的容器列表.

A YARN application has the following roles: yarn client, yarn application master and list of containers running on the node managers.

当Spark应用程序在YARN上运行时,它具有自己的yarn客户程序和yarn应用程序主版本.

When Spark application runs on YARN, it has its own implementation of yarn client and yarn application master.

在这些背景下,主要区别在于驱动程序的运行位置.

With those background, the major difference is where the driver program runs.

  1. 纱线独立模式:您的驱动程序正在作为纱线应用程序主线程运行,该线程本身在集群中的一个节点管理器上运行. Yarn客户端只是从应用程序主机获取状态.此模式与mapreduce作业相同,在该模式下,MR应用程序主节点协调容器以运行map/reduce任务.
  2. 纱线客户端模式:您的驱动程序正在纱线客户端上运行,您在该客户端上键入命令以提交spark应用程序(可能不是纱线群集中的机器).在这种模式下,尽管驱动程序正在客户端计算机上运行,​​但是任务是在YARN群集的节点管理器中的执行程序上执行的.

参考: http://spark.incubator.apache.org/docs/latest/cluster-overview.html

这篇关于什么是Spark中的yarn-client模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆