1

For Querying Cassandra data using Spark SQL in Java, I come across 2 documentation from datastax with version 4.6 and 5.0

The documentation for 5.0 recommends HiveContext while 4.6 docs recommends CassandraSQLContext . Which one should i use ? I am using Apache Cassandra 3.9

3
  • if you are using apache cassandra, you must have installed spark... DSE 4.6 comes with spark 1.4.x while DSE 5.0 comes with 1.6.x. In case you are using spark 2.0 then SQLContext and Hivecontext are bundled into sparksession Commented Mar 27, 2017 at 9:21
  • I am using spark 2.1. Can you please point me to an example please ? Commented Mar 27, 2017 at 9:23
  • 1
    spark.apache.org/docs/latest/…... spark.apache.org/docs/latest/… Commented Mar 27, 2017 at 9:29

1 Answer 1

1

I think that if your are going to use 5.0 version there will be not CassandraSQLContext - it was removed since 4.7.

Sign up to request clarification or add additional context in comments.

2 Comments

What if I am using Apache Cassandra 3.9 ?
It depends on which version of DataStax Enterprise you use - do you have any or you have cassandra standalone? if cassandra and spark are standalone try to follow coderwall.com/p/o9bkjg/setup-spark-with-cassandra-connector (module developed by DataStax) using only spark-cassandra-connector

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.