Thursday, October 13, 2016

CassandraSQLContext not found after spark-cassandra-connector upgrade to v2.0

scala> val cass=new CassandraSQLContext(sc)
:33: error: not found: type CassandraSQLContext
       val cass=new CassandraSQLContext(sc)
                    ^

scala> import org.apache.spark.sql.cassandra.CassandraSQLContext
:32: error: object CassandraSQLContext is not a member of package org.apache.spark.sql.cassandra
       import org.apache.spark.sql.cassandra.CassandraSQLContext
              ^
==================
https://github.com/datastax/spark-cassandra-connector/blob/07b47effeb10480b4b80b2686d0e6874aefa0a24/CHANGES.txt


2.0.0 M1
* Added support for left outer joins with C* table (SPARKC-181)
* Removed CassandraSqlContext and underscore based options (SPARKC-399)
* Upgrade to Spark 2.0.0-preview (SPARKC-396)
- Removed Twitter demo because there is no spark-streaming-twitter package available anymore
- Removed Akka Actor demo becaues there is no support for such streams anymore
- Bring back Kafka project and make it compile
- Update several classes to use our Logging instead of Spark Logging because Spark Logging became private
- Update few components and tests to make them work with Spark 2.0.0
- Fix Spark SQL - temporarily
- Update plugins and Scala version