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