Cassandra 中的分区键大小

partition key size in Cassandra

如何 extract/calculate 分区键大小: nodetool cfhistograms,报告与单元格计数相关的最大分区键,但没有说明关于大键的任何信息。

有没有办法提取最大的分区键或至少得到所有分区键 + 大小的列表?

如何计算分区键大小:https://shermandigital.com/blog/calculate-the-size-of-a-cassandra-table/

Cassandra stores at least 15 bytes worth of metadata for each column. Counter columns require an additional eight bytes of overhead as do expiring columns (columns with the time-to-live value set). In addition to metadata, we need space for the name of each column and the value stored within it

然后

Every partition key requires 23 bytes of metadata

所以你计算列的大小(包括分区键列):

column_size = column_metadata + column_name_value + column_value