You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Arvind Kandpal (Jira)" <ji...@apache.org> on 2026/06/26 06:33:00 UTC
[jira] [Comment Edited] (CASSANDRA-20793) Improve compact nodetool command to comply with standards by splitting into separate subcommands
[ https://issues.apache.org/jira/browse/CASSANDRA-20793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18091756#comment-18091756 ]
Arvind Kandpal edited comment on CASSANDRA-20793 at 6/26/26 6:32 AM:
---------------------------------------------------------------------
Hi [~suhel] as discussed , I am going to start work on this ticket.
was (Author: JIRAUSER311141):
Hi [~suhel] as discussed , I am taking this ticket.
> Improve compact nodetool command to comply with standards by splitting into separate subcommands
> ------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-20793
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20793
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Tool/nodetool
> Reporter: Maxim Muzafarov
> Assignee: Arvind Kandpal
> Priority: Normal
>
> The current compact command violates picocli best practices by mixing different types of arguments in a single command. The command currently accepts three distinct types of input:
> # Keyspace/Table compaction: [<keyspace> <tables>...] - for forcing major compaction on specific keyspaces and tables
> # SSTable file compaction: <SSTable file>... - for user-defined compaction on specific SSTable files
> # Token range compaction: Using --start-token and --end-token options for token-based compaction
> Problems with current implementation:
> * The command handles three completely different compaction scenarios
> * Users must understand complex conditional logic to determine which mode to use
> * Other nodetool commands use clear subcommands for different operations
> * The execute() method contains complex conditional checks that should be handled by picocli's argument validation
> * The usage description "[<keyspace> <tables>...] or <SSTable file>..." is confusing
> h3. Proposed Solution
> Split the compact command into three separate subcommands under a main compact command:
> # compact keyspace - For keyspace/table compaction
> # compact sstables - For user-defined SSTable compaction
> # compact range - For token range compaction
> All the changes must be backward compatible, this mean the compact command must be deprecated first.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org