为什么 Spark 1.6 不使用 Akka? [英] Why Spark 1.6 does not use Akka?

查看:31
本文介绍了为什么 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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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