Apache Spark 2.3.1 和 2.0.0 的兼容性

Compatibility of Apache Spark 2.3.1 and 2.0.0

我想使用使用 Apache Spark 2.0.0 开发的应用程序(GitHub repo here) but I only have Spark 2.3.1 installed on my iMac (it seems to be the only one supported by homebrew at the moment). I can successfully compile it with sbt assembly but then when I run the first example given here 我收到以下错误:

java.lang.NoSuchMethodError: breeze.linalg.DenseVector$.canDotD()Lbreeze/generic/UFunc$UImpl2;

这是Spark 2.0.0和Spark 2.3.1使用的两个不同版本的Scala-breeze之间的兼容性问题吗?有没有办法轻松更改代码以便能够将其与 Spark 2.3.1 一起使用? (我以前从未使用过scala)

应该是吧。 您始终可以手动下载所需版本的 Apache Spark(不是通过自制软件,而是通过从官方页面下载 tar.gz 存档并解压缩)。