mirror of https://github.com/apache/cassandra
Avoid showing estimated key as -1 in tablestats
patch by Mahdi Mohammadi; reviewed by yukim for CASSANDRA-11587
This commit is contained in:
parent
a5dac1298b
commit
39b86e3792
|
|
@ -1,4 +1,5 @@
|
|||
2.2.7
|
||||
* Avoid showing estimated key as -1 in tablestats (CASSANDRA-11587)
|
||||
* Fix possible race condition in CommitLog.recover (CASSANDRA-11743)
|
||||
* Enable client encryption in sstableloader with cli options (CASSANDRA-11708)
|
||||
* Possible memory leak in NIODataInputStream (CASSANDRA-11867)
|
||||
|
|
|
|||
|
|
@ -185,7 +185,15 @@ public class TableStats extends NodeToolCmd
|
|||
if (offHeapSize != null)
|
||||
System.out.println("\t\tOff heap memory used (total): " + format(offHeapSize, humanReadable));
|
||||
System.out.println("\t\tSSTable Compression Ratio: " + probe.getColumnFamilyMetric(keyspaceName, tableName, "CompressionRatio"));
|
||||
System.out.println("\t\tNumber of keys (estimate): " + probe.getColumnFamilyMetric(keyspaceName, tableName, "EstimatedRowCount"));
|
||||
|
||||
Object estimatedRowCount = probe.getColumnFamilyMetric(keyspaceName, tableName, "EstimatedRowCount");
|
||||
if (Long.valueOf(-1L).equals(estimatedRowCount))
|
||||
{
|
||||
estimatedRowCount = 0L;
|
||||
}
|
||||
|
||||
System.out.println("\t\tNumber of keys (estimate): " + estimatedRowCount);
|
||||
|
||||
System.out.println("\t\tMemtable cell count: " + probe.getColumnFamilyMetric(keyspaceName, tableName, "MemtableColumnsCount"));
|
||||
System.out.println("\t\tMemtable data size: " + format((Long) probe.getColumnFamilyMetric(keyspaceName, tableName, "MemtableLiveDataSize"), humanReadable));
|
||||
if (memtableOffHeapSize != null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue