【互动问答分享】第18期决胜云计算大数据时代Spark亚太研究院公益大讲堂

探讨Spark中Master与Driver的区别,Standalone与Yarn的选择策略,及如何实现Spark HA高可用性。

 

“决胜云计算大数据时代”

Spark亚太研究院100期公益大讲堂 【第18期互动问答分享】

 

Q1:Master和Driver的是同一个东西吗?

        两者不是同一个东西,在Standalone模式下Master是用于集群资源管理和调度的,而Driver适用于指挥Worker上的Executor通过多线的方式处理任务的;

        Master位于集群的管理节点,一般和 NameNode在同一个节点上;

        Driver一般都位于客户机上,客户机一般都不属于集群,但是和集群在同一个网络环境下,因为客户机中的Driver要和集群中的Executor频繁的交互;

 

Q2:Standalone和Yarn之间如何选择

        Standalone和Yarn都是用于资源管理的系统,Standalone是专门为Spark打造的资源管理和分配方式,是轻量级的,而Yarn是大数据通用的资源管理框架,不仅可以用于管理Spark顶点资源分配,也可以用于管理实现了Yarn的其它计算平台的资源管理和分配;

        如果在生产系统中有多套计算框架 ,例如Spark、MapReduce、Mahout并存,建议使用Yarn或者Mesos进行资源统一的管理和调度;如果只使用Spark的话,建议使用Standalone就足够了,Yarn比较消耗资源;

 

Q3:Spark 的HA怎么处理的?

        对于Master的HA,在Standalone模式下,Worker节点自动是HA的,对于Master的HA,一般采用Zookeeper;

        Utilizing ZooKeeper to provide leader election and some statestorage, you can launch multiple Masters in your cluster connected to the sameZooKeeper instance. One will be elected “leader” and the others will remain instandby mode. If the current leader dies, another Master will be elected,recover the old Master’s state, and then resume scheduling. The entire recoveryprocess (from the time the the first leader goes down) should take between 1and 2 minutes. Note that this delay only affectsscheduling new applications – applications that were already runningduring Master failover are unaffected

        对于Yarn和Mesos模式,ResourceManager一般也会采用ZooKeeper进行HA;

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值