Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

krishna_r_nutulapati_81343 avatar image
krishna_r_nutulapati_81343 asked ·

Does a partition with clustering columns live on a single node or can it span across nodes?

I have one requirement, where I used range query on clustered column to pull data of non primary column.

Select list of udt objects where year = 2019( partition key) and month = 11 ( partition key ) and dayhour <=3124 (clustered column)


Dayhour = clustered column.

Year = partition key

Month = partition key

List of udt objects = non primary column.


What I understand from documentation is above kind of range queries are still efficient , as it will hit only one partition and

Partition key columns also in where clause.

As per I understand, data belong to one partition will remain in single node and other nodes can be replicas. Is that correct statement?

Is it possible that with token distribution among nodes, can we have single partition data distributed among multiple nodes.(disregarding replicas).



Thanks

range queries
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@krishna_r_nutulapati_81343 No, a partition cannot be distributed across multiple nodes. By definition, it's how data gets "partitioned" around a cluster. The partitioner (Murmur3Partitioner by default) determines where the data is placed in the ring (DC) based on the partition key.

For more information, see Partitioners. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.