[ 
https://issues.apache.org/jira/browse/CASSANDRA-17445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Muzafarov updated CASSANDRA-17445:
----------------------------------------
    Test and Documentation Plan: No documentation is required. To test the 
patch, run pre-commit on the CI
                         Status: Patch Available  (was: In Progress)

Hello [~maedhroz], [~smiklosovic] 

Changes are ready for review (we'll squash commits on merge), and the CI looks 
fine.
[https://github.com/apache/cassandra/pull/2497]

There are a few things about the changes that are worth mentioning:
 # *A new system setting.* The {{cassandra.cli.layout}} controls the output of 
the commands help message (possible values {_}'cassandra'{_}, _'picocli'_ with 
the default {_}'cassandra'{_}).
 # *Parsing of input args.* There are _NO changes_ to how the cli input 
arguments are processed and the output result of the commands. This makes all 
commands compatible with everything we had before (confirmed by the CI results 
and a bunch of new tests).
 # *A new annotation.* The {{@CassandraUsage}} annotation has been introduced 
to align the command help output with the airline help output style.
 # *The help output diff.* For several reasons, including POSIX argument 
naming, line-breaking differences between the airline and the picocli, how the 
airline handles help output for subcommands, and the bugs in the airline 
itself, there are still differences between the help output.
This is not critical, see the link below for details
_NOTE: LEFT - a new format (17445), RIGHT - an old format (trunk)_
[https://github.com/Mmuzaf/cassandra/compare/cassandra-17445...Mmuzaf:cassandra:cassandra-17445-diff-trunk]
 # *TODO - the printPort option.* This is the current state of the command 
hierarchy in the trunk, but we should change it. I suggest we do this in a new 
JIRA task. Although the {{printPort}} option is only used in 7 sub-commands, it 
is currently a global option, so it affects all the commands hierarhy. We 
should move it down to the commands where it's used.
[https://github.com/apache/cassandra/pull/2497/files#diff-3a231d2a455dafc79934b29056aa6d7d5acbdfbed98f47f90251e180745b887fR179]
 # *TODO - mixed arguments.* This is not a problem for the current patch, but 
it blocks command re-usage in other interfaces. There are a few commands 
(Compact, SetConcurrency, TableHistograms, ViewBuildStatus), that mix input 
arguments and the way they are handled depends on the number of arguments 
and/or the order of the arguments. I suggest creating a new JIRA task and 
dealing with this problem.
[https://github.com/apache/cassandra/pull/2497/files#diff-bdd2b2af9cc4c7d4882d6953e760891b428a6adb8f931608b2e4287a70c96de3R33]

 

> Library airlift/airline has been deprecated
> -------------------------------------------
>
>                 Key: CASSANDRA-17445
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17445
>             Project: Apache Cassandra
>          Issue Type: Task
>          Components: Dependencies
>            Reporter: Tibor Repasi
>            Assignee: Maxim Muzafarov
>            Priority: Normal
>             Fix For: 5.x
>
>         Attachments: nodetool_cassandra_help_layout.png, 
> nodetool_picocli_help_layout.png
>
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> The [airlift/airline|https://github.com/airlift/airline] library has been 
> deprecated and is not maintained since [8 Jun 
> 2021|https://github.com/airlift/airline/commit/ae3d7e103bdc140969bde944d4ba09345d663a61].
>  It is used in many tools and some tests of Cassandra which should be 
> reviewed.
> Tools using that library:
>  * org.apache.cassandra.fqltool.FullQueryLogTool
>  * org.apache.cassandra.hints.HintsMaker
>  * org.apache.cassandra.simulator.SimulationRunner
>  * org.apache.cassandra.simulator.paxos.PaxosSimulationRunner
>  * org.apache.cassandra.simulator.test.HarrySimulatorTest
>  * org.apache.cassandra.stress.Compaction
>  * org.apache.cassandra.tools.JMXTool
>  * org.apache.cassandra.tools.NodeTool
> Alternatives (as suggested in the depreciation notice):
>  * [Airline 2|https://rvesse.github.io/airline/]
>  * [picocli|https://picocli.info/]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to