cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ajay <>
Subject Spark SQL Vs CQL performance on Cassandra
Date Thu, 11 Dec 2014 13:09:58 GMT

To test Spark SQL Vs CQL performance on Cassandra, I did the following:

1) Cassandra standalone server (1 server in a cluster)
2) Spark Master and 1 Worker
Both running in a Thinkpad laptop with 4 cores and 8GB RAM.
3) Written Spark SQL code using Cassandra-Spark Driver from Cassandra
( Run with spark://
4) Writen CQL code using Java driver from Cassandra
In both the case, I create 1 millions rows and query for 1

1) It takes less than 10 milliseconds using CQL (SELECT * FROM users WHERE
2) It takes around .6 second using Spark (either SELECT * FROM users WHERE
name='Anna' or javaFunctions(sc).cassandraTable("test", "people",
mapRowTo(Person.class)).where("name=?", "Anna");

Please let me know if I am missing something in Spark configuration or
Cassandra-Spark Driver.

Ajay Garga

View raw message