Cassandra CQL 中的聚合查询 [英] Aggregation queries in Cassandra CQL

查看:41
本文介绍了Cassandra CQL 中的聚合查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在评估 Cassandra 作为分析应用程序的数据存储.计划是在 Cassandra 中转储原始数据,然后主要在其上运行聚合查询.看一下 CQL,它似乎不支持一些传统的 SQL 运算符,例如:

We are currently evaluating Cassandra as the data store for an analytical application. The plan was to dump raw data in Cassandra and then run mainly aggregation queries over it. Looking at CQL, it does not seem to support some traditional SQL operators like:

  • 典型的聚合函数,如平均值、总和、计数-不同等.
  • 拥有 Groupby 的运营商

我在文档中没有找到任何可以帮助实现上述目标的内容.还检查是否有任何钩子可以提供诸如扩展之类的功能.比如说 Mongodb 中的数据库 map-reduce 或关系数据库中的用户定义函数.

I did not find anything that can help achieve the above in the documentation. Also checked if there were any hooks for providing such functions as extensions. Say like in database map-reduce in Mongodb, or user-defined-functions in Relational DBs.

人们确实谈到了付费 Datastax 企业版,这也不是通过普通的 Cassandra 实现的,而是通过 Hadoop-Hive-Pig-Hadoop 等独立组件实现的.或者有关于在转储数据之前进行所需的预聚合的建议到数据库,因为 Cassandra 写入速度很快.

People do talk about the paid Datastax Enterprise Edition, and that too achieves this not via plain Cassandra, but through separate components like Hadoop-Hive-Pig-Hadoop etc. Or there are suggestions about doing needed pre-aggregations before dumping data to the DB since Cassandra writes are fast.

看起来开销太大了,至少对于我们需要的基本东西来说是这样.我在这里错过了一些基本的东西吗?

It looked like too much of overheads, at least for basic stuff we need. Am I missing something fundamental here?

非常感谢这方面的帮助.

Would highly appreciate help on this.

推荐答案

聚合在 cassandra 中可用,作为 CASSANDRA-4914 在 2.2.0-rc1 版本中可用.

Aggregation is available in cassandra as part of CASSANDRA-4914 which is available in the 2.2.0-rc1 release.

这篇关于Cassandra CQL 中的聚合查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆