Spark 2.0 and Scala 2.11 on Dataproc? - google-cloud-dataproc

Spark 2.0 final was released last week - when can we expect to see it on Dataproc? Spark 2.0 uses Scala 2.11 as default - does this mean that Dataproc will use Scala 2.11?
Scala 2.11 is actually the feature we are most eagerly awaiting. Scala 2.10 is getting old and we have a couple of libraries we would like to use that we cannot because they don't support 2.10.

To follow this up, Cloud Dataproc 1.1, newly released this week, has Spark 2.0 and Scala 2.11 and is intended for production uses. See the release notes for more details!

Dataproc has a preview image version with Spark 2.0 (currently an earlier RC) and Scala 2.11, which you can try out today.
It is not supported for production use cases, because it is less vetted and we will push breaking changes as we refine the preview into a new fully supported image version. When it is fully stabilized we will ship a new image version with Spark 2 and Scala 2.11.

Related

Running scala 2.12 on emr 5.29.0

I have a jar file compiled in scala 2.12 and now I want to run it on emr 5.29.0. How do I run them as the default version of emr 5.29.0 is scala 2.11.
As per this thread in AWS Forum, all Spark versions on EMR are built with Scala 2.11 as it's the stable version:
On EMR, Spark is built with Scala-2.11.x, which is currently the
stable version. As per-
https://spark.apache.org/releases/spark-release-2-4-0.html ,
Scala-2.12 is still under experimental support. Our service team is
already aware of this feature request, and they shall be adding
Scala-2.12.0 support in coming releases, once it becomes stable.
So you'll have to wait until they add support on future EMR releases or you may want to build a Spark with Scala 2.12 and install it on EMR. See Building and Deploying Custom Applications with Apache Bigtop and Amazon EMR and Building a Spark Distribution for EMR.
UPDATE:
Since Release 6.0.0, Scala 2.12 can be used with Spark on EMR:
Changes, Enhancements, and Resolved Issues
Scala
Scala 2.12 is used with Apache Spark and Apache Livy.
Just an Idea, if waiting is not the option!
Is it possible to package the latest scala jars with the application with appropriate maven scope defined and point those packages with the spark property
--properties spark.jars.repositories ??
Maybe you'll have to figure out a way to transfer the jars to the driver node. If s3 is an option that can be used as intermediatory storage.

Is it possible to use MLFlow and H2o.ai sparkling water in a Scala based project?

I'm solving a Scala data science problem in Intellij using maven. I noticed that MLFlow spark (https://mvnrepository.com/artifact/org.mlflow/mlflow-spark/1.5.0) is dependent on scala 2.12 while h2o.ai sparkling water is dependent on scala 2.11 (https://mvnrepository.com/artifact/ai.h2o/sparkling-water-core). Is there any way to use both of these together using Scala?
You can track progress of introducing Scala 2.12 support in Sparkling Water with the JIRA ticket SW-1846.

Compatibility of Apache Spark 2.3.1 and 2.0.0

I would like to use an application developed with 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 I get the following error:
java.lang.NoSuchMethodError: breeze.linalg.DenseVector$.canDotD()Lbreeze/generic/UFunc$UImpl2;
Is this a compatibility issue between the two different versions of Scala-breeze used by Spark 2.0.0 and Spark 2.3.1. Is there a way to easily change the code in order to be able to use it with Spark 2.3.1? (I have never used scala before)
It probably is.
You can always manually download required version of Apache Spark (not by homebrew, but by downloading tar.gz archive from official page and just extracting it).

confluent build with 2.10 package contain scala 2.11 jar

I downloaded confluent-2.0.0-2.10.5.tar.gz, because I want to have scala 2.10 package
but still the kafka jar in /share/java/schema-registry is still kafka_2.11-0.9.0.0-cp1.jar
Is there anyway I can get a clean 2.10 scala confluent package
The 2.10 refers to the version of the Kafka subpackage, but a different version may be used by other subpackages.
The tar.gz packages use the 2.11 versions where a different subpackage requires access to the core Kafka jar that has a Scala dependency. (Actually, the version they depend on is really whichever Scala version is supported by Kafka and considered most stable and well supported upstream). This is necessary because Scala libraries aren't necessarily binary compatible between different Scala versions, which would mean that not doing this would require multiple versions of all the services that use the Kafka libraries, especially on platforms like Debian and RPM-based distros, i.e. we'd need a schema-registry-2.10 and schema-registry-2.11. Instead, we sort of vendorize the entire Kafka library for services that depend on it.
Note that the files under /share/java/kafka only use Scala 2.10 and if you need to pull in the clients, you can safely add that to your classpath. The use of 2.10 or 2.11 for any of the other services shouldn't matter as they are simply that: services that you execute. Any libraries that you might need to put on your classpath (e.g. serializers) only depend on the pure Java libraries in Kafka and are therefore safe to use with Kafka libraries compiled with any Scala version.

When will the Lift framework get compatible with Scala 2.9.1 and SBT 0.11?

I am starting a new Lift project from scratch and would like to develop it against Scala 2.9.1 and SBT 0.11. Where can I get the current development Lift branch compatible with these versions and when is it going to be released for production?
I could also make use of sample projects (a REST web service and a normal web site) for these versions.
UPDATE: I've came to the idea Lift doesn't support Scala 2.9.1 and SBT 0.11 because standard examples come with SBT 0.5.5 and 2.9.0.1, and there is a record on the Lift web site saying "We are in process of building Lift against Scala 2.9.1". But practically, I've managed to use 2.9.1 with Lift 2.4-M4, seems working just fine (and as Debilski has said below, SBT 0.11 can be used to build a Lift project). So the question is more about when Scala 2.9.1 and SBT 0.11 will become mainstream for Lift and when will Lift examples be available with these versions?