-1

command I ran was nodetool tablehistograms <keyspace> <table> The bug was No SSTables exists, unable to calculate 'Partition Size' and 'Cell Count' percentiles

I tried to calculate partition size for better selections on partition keys, but nodetool command did not work fine as the partition size is not provided with this error

SSTables are immutable as far as concerned, and I do not know if I should (and how to) create SSTables based on existed ones?

Experts, please come solve this problem, really appreciate it.

Best

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
HulkZZH
  • 1
  • 1
  • Welcome to Stack Overflow! A friendly reminder that this site is for getting help with coding, algorithm, or programming language problems so I voted to have your post moved to DBA Stack Exchange. For future reference, you should post DB admin/ops questions on https://dba.stackexchange.com/questions/ask?tags=cassandra. Cheers! – Erick Ramirez Dec 02 '22 at 06:36

2 Answers2

1

How exact do you need to be when measuring the partition sizes? For a quick estimate, 'nodetool tablestats <keyspace.table>' will give you the min, max and avg partition size.

If a more accurate measurement is needed, you could download and use DSBulk and run the count option to pull the largest n partitions for a table, which will also print the key, for example:

dsbulk count --stats.modes partitions --stats.numPartitions <n> -k myKeyspace -t myTable
Paul
  • 351
  • 1
  • 5
0

There are no histograms available for the command to report if there are no SSTables on disk.

The nodetool tablehistograms command collects the metrics from the SSTables but if there are none stored on disk then there is nothing for the command to report.

Make sure that the table contains data in the data/ directory then try again. Cheers!


Please support the Apache Cassandra community by hovering over the cassandra tag above and click on Watch tag. Thanks!

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23