为什么 Spark 1.6 不使用 Akka?

编程入门 行业动态 更新时间:2024-10-24 20:16:36
本文介绍了为什么 Spark 1.6 不使用 Akka?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我阅读Master 类,receiveAndReply 方法似乎没有使用 Akka.[参见这里.]

When I read spark-1.6 source code of the Master class, the receiveAndReply method seems not to be using Akka. [Cf. here.]

为什么不使用 Akka ?他们用什么代替了 Akka?

Why is it not using Akka ? And What did they replace Akka with ?

推荐答案

使 Spark 独立于 Akka 背后的动机在 SPARK-5293 这是 Akka 相关问题的总括性任务.

The motivation behind making Spark independent from Akka are well described in SPARK-5293 which is an umbrella task for Akka related issues.

引用原始描述:

Spark 依赖于 Akka,[因此] 用户不可能依赖不同的版本,而且我们过去曾收到许多请求,寻求有关此特定问题的帮助.例如,Spark Streaming 可能被用作 Akka 消息的接收者——但我们对 Akka 的依赖要求上游 Akka actor 也使用相同版本的 Akka.

Spark depends on Akka, [so] it is not possible for users to rely on different versions, and we have received many requests in the past asking for help about this specific issue. For example, Spark Streaming might be used as the receiver of Akka messages - but our dependency on Akka requires the upstream Akka actors to also use the identical version of Akka.

由于我们对 Akka 的使用有限(主要用于 RPC 和单线程事件循环),我们可以用替代的 RPC 实现和 Spark 中的常见事件循环替换它.

Since our usage of Akka is limited (mainly for RPC and single-threaded event loop), we can replace it with alternative RPC implementations and a common event loop in Spark.

如您所见,主要原因很简单 - 让用户更灵活地创建自己的应用程序.

As you can see, the main reason is simple - to give users more flexibility in creating their own applications.

还去除了像 Akka 这样的复杂依赖项,它无论如何都没有被 Spark 广泛使用,这意味着更低的维护成本.

Also removing complex dependency like Akka, which hasn't been used extensively by Spark anyway, which means lower cost of maintenance.

更多推荐

为什么 Spark 1.6 不使用 Akka?

本文发布于:2023-11-25 03:06:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1628064.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Spark   Akka

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!