Hey Brad,

Thanks for raising the topic. I wanted to mention we are now on a very old
version of commons-cli (1.1 from 2007). So I would suggest we first update
it.
While there is activity in the commons-cli github repo (a lot of dependency
updates as far as I can tell from a quick look), the last version is 1.5
from 2021.

Best regards,
Ekaterina

On Mon, 10 Jul 2023 at 11:47, Brad <bscho...@gmail.com> wrote:

> The Apache Commons CLI library provides an API for parsing command line
> options with the package org.apache.commons.cli and this is already used by
> a dozen of existing Cassandra utilities including:
>
> SSTableMetadataViewer, StandaloneScrubber, StandaloneSplitter,
> SSTableExport, BulkLoader, and others.
>
>
> However, cassandra-stress is an outlier which uses its own custom classes
> to parse command line options with classes such as OptionsSimple.  In
> addition, the options syntax for username, password, and others are not
> aligned with the format used by CQLSH.
>
> This suggestion is to:
>
> a) Upgrade cassandra-stress to use Apache Commons CLI (no new dependencies
> are required as this library is already used by the project)
>
> b) Align the cassandra-stress CLI options with those in CQLSH,
>
> For example, using the new syntax like CQLSH:
>
>
> cassandra-stress -username foo -password bar
>
>
> and replacing the old syntax:
>
> cassandra-stress -mode username=foo and password=bar
>
>
> This will simplify and unify the code base, eliminate code and reduce the
> confusion between similar named classes such
> as org.apache.cassandra.stress.settings.{Option, OptionsMulti,
> OptionsSimple} and org.apache.commons.cli.{Option, OptionGroup, Options)
>
> If there are no significant objections, I can raise a Jira for this
> proposal.
>
> Regards,
>
> Brad Schoening
>

Reply via email to