2

我是 Accumulo 的新手。我知道我可以使用 Hadoop 和 MapReduce 编写 Java 代码来扫描、插入、更新和删除数据。我想知道的是Accumulo中是否可以进行聚合。

我知道在 MySql 中我们可以使用groupby, orderby, max, min, count, sum, joins, 嵌套查询等。它们是否有可能直接或间接在 Accumulo 中使用这些函数。

4

4 回答 4

4

Accumulo 通过使用组合器迭代器(Accumulo 组合器示例)支持聚合。

迭代器主要在服务器端运行,但也可以在客户端运行,并且可以在将数据发送回客户端之前执行相当多的计算。

Accumulo 与许多迭代器一起打包,更具体地说, summingCombiner 用于对条目的值求和。Dave Medinet 的博客有一些很好的例子(Accumulo 博客)。更具体地说,使用 summingCombiner 来实现 wordcount(Accumulo 中的Word Count)。我还建议注册 Accumulo 用户邮件列表(邮件列表)。

于 2014-01-24T16:04:31.783 回答
0

Some aggregation is supported in Accumulo, over multiple entries, and even multiple rows, within each tablet. Aggregation across tablets would need to be done on the client side or in a MapReduce job.

于 2013-09-28T06:37:28.770 回答
0

我喜欢认为 Accumulo 具有出色的 agg 功能。我在其上运行 OLAP 解决方案,在 40 个节点上拥有数亿个密钥。除了基本的 SummingCombiner,我还推荐更新的 statscombiner

http://accumulo.apache.org/1.4/apidocs/org/apache/accumulo/examples/simple/combiner/StatsCombiner.html

它为您提供有关一组键的基本统计信息。

您可以在 maj compaction、minor compaction 或 scan time 设置组合器。如果您有大量数据和大量涓涓键,我不建议合并扫描时间,因为它会减慢扫描时间(并非总是如此)。

高温高压

于 2014-01-27T02:11:07.510 回答
0

是的,Accumulo 中可以进行聚合。您可以通过以下方式实现它们 -

1)使用内置的组合器,在您摄取时聚合数据。

2)制作定制的聚合迭代器,然后将其部署在次要或主要压缩中。

于 2018-11-02T05:09:13.670 回答