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

mishra.anurag643_153409 avatar image
mishra.anurag643_153409 asked jaroslaw.grabowski_50515 answered

How can I get max partition size for a table?

I am reading a table from cassandra , and I am facing delay in read request. My observation is that there is very big partition in cassandra but when I am running cfstats command it returns

Compacted partition maximum bytes , which is way larger than table size . I want to get the partition size that is read by spark . How can I get actual size of partition ?
cassandra
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.

Erick Ramirez avatar image
Erick Ramirez answered

There isn't an easy way of finding the largest partition in a table. That functionality requires a full table scan and that operation isn't allowed in Cassandra.

Have a look at cassandra-sstable-tools. I haven't tried it myself but you might find something there that meets your needs. 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.

jaroslaw.grabowski_50515 avatar image
jaroslaw.grabowski_50515 answered

In addition to what Erick said, you might also look into Spark partition sizes in Spark UI. You won't get exact Cassandra partition sizes there, as Spark partition usually contains many Cassandra partitions.

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.