zaaath opened a new pull request, #2977:
URL: https://github.com/apache/cassandra/pull/2977

   Standardizes space and memory formatting in `nodetool tablestats` 
human-readable output.
   
   ### Before
   Nodetool tablestats returns a mix of "bytes", "KiB/MiB/GiB", or no units at 
all.
   Example:
   ```
           Space used (live): 1463210998523 bytes
           Space used (total): 1463210998523 bytes
           Space used by snapshots (total): 0
           Off heap memory used (total): 607419608 bytes
   ...
           Memtable data size: 248539982 bytes
           Memtable off heap memory used: 0 bytes
   ...
           Bytes repaired: 0.000KiB
           Bytes unrepaired: 4315.386GiB
           Bytes pending repair: 0.000KiB
   ...
           Bloom filter space used: 33590024 bytes
           Bloom filter off heap memory used: 33532560 bytes
           Index summary off heap memory used: 8174024 bytes
           Compression metadata off heap memory used: 565713024 bytes
           Compacted partition minimum bytes: 36
           Compacted partition maximum bytes: 17797419593
           Compacted partition mean bytes: 189740
   ```
   
   ### After
   Nodetool tablestats formats space and memory numbers using KiB/MiB/GiB units 
with three significant digits and "KiB" being the smallest unit.
   Example:
   ```
           Space used (live): 1.33 TiB
           Space used (total): 1.33 TiB
           Space used by snapshots (total): 0.000 KiB
           Off heap memory used (total): 579 MiB
   ...
           Memtable data size: 237 MiB
           Memtable off heap memory used: 0.000 KiB
   ...
           Bytes repaired: 0.000 KiB
           Bytes unrepaired: 4.21 TiB
           Bytes pending repair: 0.000 KiB
   ...
           Bloom filter space used: 32.0 MiB
           Bloom filter off heap memory used: 31.9 MiB
           Index summary off heap memory used: 7.80 MiB
           Compression metadata off heap memory used: 539 MiB
           Compacted partition minimum bytes: 0.035 KiB
           Compacted partition maximum bytes: 16.6 GiB
           Compacted partition mean bytes: 185 KiB
   ```
   
   ### How to reproduce
   ```bash
   nodetool tablestats -H
   ```
   
   Tests
   ```bash
   ant testsome -Dtest.name=org.apache.cassandra.utils.FBUtilitiesTest
   ant testsome 
-Dtest.name=org.apache.cassandra.tools.nodetool.stats.TableStatsPrinterTest
   ant testsome -Dtest.name=org.apache.cassandra.tools.nodetool.TableStatsTest
   
   patch by @zaaath; reviewed by @smiklosovic for CASSANDRA-19015


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to