1

I am new to Cassandra I am actually doing some investigation and proof of concept to see if it is suitable for our current task. As I am reading about Cassandra and according to what I understand it does not support Aggregations or Map Reduce framework to accomplish aggregation tasks. I have checked these question but they are not a concrete answer to my question: Aggregation queries in Cassandra CQL For example if I have a table of CDRs (Call Data Record )

+--------------+----------+---------+------------+
| src          | duration | billsec | route_rate |
+--------------+----------+---------+------------+
| 0000FFFF0008 | 37       | 30      | 0.01       | 
+--------------+----------+---------+------------+

sotred in Casandra can I execute queries some thing like

SELECT * FROM CDRS GROUP BY src ORDER BY src, billsec 

MongoDB, Hadoop, and may others, provide Map Reduce, RDBMS provide GROUP BY.

Does Cassandra provides somethings similar and can you provide some example ?

Community
  • 1
  • 1
Adelin
  • 18,144
  • 26
  • 115
  • 175

3 Answers3

2

Cassandra is a NoSQL database and doesn't support map reduce aggregations by itself (although you can do a lot with the CQL interface). On the other hand, it does support the ColumnFamilyInputFormat and ColumnFamilyOutputFormat classes that are used by mapreduce to read and write data respectively from and to Cassandra. Cassandra also ships with components that let it integrate very nicely with Spark.

Chris Gerken
  • 16,221
  • 6
  • 44
  • 59
1

Cassandra 2.2 includes CASSANDRA-4914 - Aggregate Functions in CQL. This is currently available as a release candidate (2.2-rc1) on the cassandra downloads page.

mikea
  • 6,537
  • 19
  • 36
  • Thanks for the update! I've been watching the release discussions as well, and I can't wait to get some time to try out new RC. – Aaron Jun 11 '15 at 14:10
0

On MapReduce with Cassandra: You can easily use Apache Hive which will translate your query to a Hadoop Job & provides a JDBC Layer on top of Cassandra or you may opt for Spark too.

Puspendu Banerjee
  • 2,631
  • 16
  • 19