Does Cassandra support aggregation function or any other capabilities like Map Reduce?

517 views Asked by At

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 ?

3

There are 3 answers

0
Chris Gerken On

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.

1
mikea On

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.

0
Puspendu Banerjee On

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.