Quantcast
Channel: User user1944408 - Stack Overflow
Viewing all articles
Browse latest Browse all 26

Can I have rows ordered by key and partitioned randomly?

$
0
0

For example if I process a lot of transactions [timestamp (key), value, trader,..] I would like to have random partitioning for the sake of load balancing.

But for the sake of queries I would like these transactions to be ordered by timestamps on each node so that it would be very fast to go through all transactions in the last 5 minutes (or some other period) and combine totals using MapReduce.

Why does cassandra sort keys in the file randomly if I use random partitioner?

Q1: Is there a workaround for this? I could use indexing but it is not ideal.

Q2. Out of curiosity I would like to know why is key sorting in one node related to partition strategy?


Viewing all articles
Browse latest Browse all 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>