I'm observing some build errors in Scala IDE. While I know how to fix, I still don't understand how that works under the hood. I first elaborate on my case, and ask the question at the very bottom.
environment: mac
spark version 2.4.5: brew info apache-spark
returns apache-spark: stable 2.4.5, HEAD
From the official page (https://spark.apache.org/docs/latest/index.html) I'm seeing this: Spark 2.4.5 uses Scala 2.12. You will need to use a compatible Scala version (2.12.x).
So, my understanding, that I need to choose scala of version 2.12 in the scala IDE
This ends up with many build errors (to save place, posting here only some of them):
from the errors I get the idea to try scala 2.11
. It works and fixes the build errors, but I'm not satisfied as I still don't understand how that works. The jar files mentioned in the error messages are all taken from the spark 2.4.5 installation folder (/usr/local/Cellar/apache-spark/2.4.5/libexec/jars/)
So, my questions are:
why choosing scala 2.11 fixes build errors given that I'm using spark 2.4.5 (which is built with 2.12 based on https://spark.apache.org/docs/latest/index.html). Why scala 2.12 doesn't work
my understanding that most of the .jar files in the
/usr/local/Cellar/apache-spark/2.4.5/libexec/jars
are built with scala 2.11. Just based on the file names: breeze_2.11-0.13.2.jar, spark-core_2.11-2.4.5.jar, and many others. Is it expected?