Я хочу суммировать " Используемое пространство (всего): 0 " для всех таблиц, перечисленных метаданными таблиц узлов nodetool .Может кто-нибудь есть идеи, как это сделать?пожалуйста, помогите.
Желаемый код: Добавить Используемое пространство (всего) значение для всех таблиц;как показано ниже:
for Table: dbtimestamp
size += value(Space used (total))
Table: dbtimestamp_compressed
size += value((Space used (total))
Table: migration_status
size += value((Space used (total))
----------------------------------------------------------------------------
nodetool tablestats metadata
Total number of tables: 584
----------------
Keyspace : metadata
Read Count: 296
Read Latency: 0.23686486486486488 ms
Write Count: 68611
Write Latency: 0.02151582107825276 ms
Pending Flushes: 0
Table: dbtimestamp
SSTable count: 0
Space used (live): 0
Space used (total): 0
Space used by snapshots (total): 0
Off heap memory used (total): 0
Table: dbtimestamp_compressed
SSTable count: 0
Space used (live): 0
Space used (total): 0
Space used by snapshots (total): 0
Off heap memory used (total): 0
Table: migration_status
SSTable count: 2
Space used (live): 13014
Space used (total): 13014
Space used by snapshots (total): 0
Off heap memory used (total): 80
Table: reporttimestamp_by_type
SSTable count: 2
Space used (live): 121332
Space used (total): 121332
Space used by snapshots (total): 0
Off heap memory used (total): 112