如何从 Cassandra 获取排序计数器

发布于 2024-12-19 22:49:20 字数 38 浏览 6 评论 0原文

我有一排计数器,我想让它的列按值排序。有什么策略或数据模型吗?

I have a row of counters and I want to get its' columns sorted by values. Is there any strategies or data models for that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我的黑色迷你裙 2024-12-26 22:49:20

恐怕没有办法让 Cassandra 为你做这件事;您需要从 Cassandra 获取整行(对大行进行分页)并在客户端中对其进行排序。

如果您的解决方案可以处理非最新结果,您可以使用定期 MapReduce 作业来为您执行此操作,并将作业结果缓存回 Cassandra。

I'm afraid there is no way of having Cassandra do this for you; you will need to get the entire row from Cassandra (paging for large rows) and sort it in the client.

You could use a periodic MapReduce job to do this for you, and cache the result of the job back into Cassandra, if your solution can cope with non-uptodate results.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文