[
https://issues.apache.org/jira/browse/CASSANDRA-20793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18113727#comment-18113727
]
Arvind Kandpal commented on CASSANDRA-20793:
--------------------------------------------
I use claude to check the possible solution it suggest me these way based on
the my existing PR ( [https://github.com/apache/cassandra/pull/4922] )
Can anyone review it , so that I can do changes accordingly ?
> 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
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> 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: [email protected]
For additional commands, e-mail: [email protected]