I'm trying to use a java class in mapping a cassandra table to spark rdd, for which I'm facing an issue that cassandra is not able to create a query to fetch the data.
According to this link https://github.com/datastax/spark-cassandra-connector/blob/master/doc/6_advanced_mapper.md, a class must bu serializable and have 'getters' and 'setters' for at least the primary key columns of the table you are trying to map.
So what I have done is, I have created a java class, created public getters and setters for each field, mapped the class to scala companion object and used it for mapping a cassandra table while retrieving the data into an rdd.
I have added code in the image links.
All of the above works seamlessly when I use scala classes