DBMS/Cassandra

Cassandra Partitioners

반응형
  • 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
반응형

'DBMS > Cassandra' 카테고리의 다른 글

Cassandra Snitch  (0) 2023.03.03
Cassandra Data replication  (0) 2023.03.03
Cassandra Gossip & seed nodes  (0) 2023.03.03
Cassandra 세컨더리 인덱스의 위험 이유 및 대응 방안  (0) 2022.12.18
카산드라 Batch operation  (0) 2022.12.18