[
https://issues.apache.org/jira/browse/CASSANDRA-19335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17814609#comment-17814609
]
Leo Toff edited comment on CASSANDRA-19335 at 2/6/24 5:25 AM:
--------------------------------------------------------------
Your comment has been addressed, I've added `-r` short flag for
`-no-human-readable`. `-r` stands for Raw. Let me know what my next steps
should be here.
I wanted to do some refactoring:
* Convert "out.printf(indent + ...)" to "out.printf(%s ..., indent ...)" in
TableStatsPrinter where printf format specifiers are used (see [Stefan's
comment in
PR#2977|https://github.com/apache/cassandra/pull/2977#discussion_r1430323676])
* Move formatting from the Holder class to the Printer class (from
TableStatsHolder to TableStatsPrinter)
* Consider renaming "formatMemory" (and other mentions of "memory") to
"formatDataSize" across TableStatsPrinter, TableStatsHolder, and FBUtilities
was (Author: JIRAUSER303078):
Your comment has been addressed, I've added "-r" short flag for
"--no-human-readable". "-r" stands for Raw. Let me know what my next steps
should be here.
I wanted to do some refactoring:
* Convert "out.printf(indent + ...)" to "out.printf(%s ..., indent ...)" in
TableStatsPrinter where printf format specifiers are used (see [Stefan's
comment in
PR#2977|https://github.com/apache/cassandra/pull/2977#discussion_r1430323676])
* Move formatting from the Holder class to the Printer class (from
TableStatsHolder to TableStatsPrinter)
* Consider renaming "formatMemory" (and other mentions of "memory") to
"formatDataSize" across TableStatsPrinter, TableStatsHolder, and FBUtilities
> Default nodetool tablestats to Human-Readable Output
> ----------------------------------------------------
>
> Key: CASSANDRA-19335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19335
> Project: Cassandra
> Issue Type: Improvement
> Components: Tool/nodetool
> Reporter: Leo Toff
> Assignee: Leo Toff
> Priority: Low
> Fix For: 5.x
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> *Current Behavior*
> The current implementation of nodetool tablestats in Apache Cassandra outputs
> statistics in a format that is not immediately human-readable. This output
> primarily includes raw byte counts, which require additional calculation or
> conversion to be easily understood by users. This can be inefficient and
> time-consuming, especially for users who frequently monitor these statistics
> for performance tuning or maintenance purposes.
> *Proposed Change*
> We propose that nodetool tablestats should, by default, provide its output in
> a human-readable format. This change would involve converting byte counts
> into more understandable units (KiB, MiB, GiB). The tool could still retain
> the option to display raw data for those who need it, perhaps through a flag
> such as --no-human-readable or --raw.
> *Considerations*
> The change should maintain backward compatibility, ensuring that scripts or
> tools relying on the current output format can continue to function correctly.
> We should provide adequate documentation and examples of both the new default
> output and how to access the raw data format, if needed.
> *Alignment*
> Discussion in the dev mailing list:
> [https://lists.apache.org/thread/mlp715kxho5b6f1ql9omlzmmnh4qfby9]
> *Related work*
> Previous work in the series:
> # https://issues.apache.org/jira/browse/CASSANDRA-19015
> # https://issues.apache.org/jira/browse/CASSANDRA-19104
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]