How to get sorted counters from Cassandra

a 夏天 提交于 2019-12-06 05:26:38

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/8428364/how-to-get-sorted-counters-from-cassandra

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!