DBMS/Cassandra
Cassandra Partitioners
seungh0
2023. 3. 3. 07:49
반응형
- A partitioner determines how data is distributed across the nodes in the cluster (including replicas)
- Basically, a partitioners is a function for deriving a token (a representating a row from its partition key, typically by hasing)
- Each row of data is distiributed across the cluster by the value of the token.
Strategies
- Murmur3Partitioner (default, from v1.2)
- uniformly distributes data across thre cluster based on MurmurHash hash value.
- RandomPartitioner
- uniformly distributes data across thre cluster based on MD5 hash values
- ByteOrderedPartitioner
- keeps an ordered distributed of data lexcially by key bytes.
- if using vnodes, don’t need to calculate the tokens
- if not using vnodes, must calculate the tokens to assign to the initial_token parameter in the cassandra.yaml
반응형