Skip to content
Advertisement

Tag: cassandra

Spark cassandra connector Java API, cannot find symbol CassandraRow

I am trying out the spark-cassandra-connector-japi example from here: https://github.com/datastax/spark-cassandra-connector/blob/master/doc/7_java_api.md The maven build fails with the following error: SimpleApp.java:[24,9] cannot find symbol [ERROR] symbol: class CassandraRow [ERROR] location: class SimpleApp My pom.xml is shown below Where is the class CassandraRow defined? I have gone through the code in package com.datastax.spark.connector.japi.CassandraJavaUtil and it is not defined there. The example asks to

Get a BigInteger attribute from Cassandra ResultSet

I’m trying to get the number of key value pairs in a Cassandra column family. Following is the code I used. But when I ran this code, I’m getting following exception. According to datastax documentation (http://www.datastax.com/drivers/java/2.0/com/datastax/driver/core/Row.html) getVarint should return a BigInteger. So why I am getting a exception here? What an I doing wrong? Answer You can get value as

Advertisement