1
votes

I'm new to Cassandra, I got confused between consistent hashing and partitioner. Are they both same ?

Please find the definitions from Datastax documentation:

A partitioner determines how data is distributed across the nodes in the cluster (including replicas). Basically, a partitioner is a function for deriving a token representing a row from its partition key, typically by hashing. Each row of data is then distributed across the cluster by the value of the token.

Consistent hashing allows distribution of data across a cluster to minimize reorganization when nodes are added or removed. Consistent hashing partitions data based on the partition key. (For an explanation of partition keys and primary keys, see the Data modeling example in CQL for Cassandra 2.2 and later.)

1

1 Answers

1
votes

With consistent hashing, the buckets are arranged in a ring with a predefined range; the exact range depends on the partitioner being used. Keys are then hashed to produce a value that lies somewhere along the ring.

I think you have already got the definition that is correct but for other ways you can understand the things from below. https://dzone.com/articles/introduction-apache-cassandras. There is good explanation about both.