3 ms·
Does Cassandra hash the primary key to get a more even distribution? If you have a sorted data store, you can get the same distribution by keying off a hash of
by cakoose 8y ago
Does Cassandra hash the primary key to get a more even distribution?
If you have a sorted data store, you can get the same distribution by keying off a hash of the "real" primary key, right?
- helper 8y agoCassandra allows you to configure a "partitioner" that determines which nodes a primary key belongs to. There is a ByteOrderPartitioner that stores partitions in order lexicographically by primary key. There is also a Murmor3 hash based partitioner (which is the recommended default). Cassandra allows you to store multiple records in sorted order within a partition. The normal recommended way to get data locality is to store records that are frequently accessed together in the same partition.