You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by "Claude Warren, Jr via dev" <de...@cassandra.apache.org> on 2023/02/23 09:54:17 UTC

[DISCUSS] Single boilerplate script

Pull request https://github.com/apache/cassandra/pull/1950/files is an
attempt to move the boilerplate coding from the script files into a single
maintainable file.

This change does 4 things:

   1. Moves the standard boiler plate from the standard scripts into a
   single maintainable script to be sourced in the original scripts with
   minimal changes.
   2. Creates a debug logging so that problem determination (as it
   CASSANDRA-17773 <https://issues.apache.org/jira/browse/CASSANDRA-17773>)
   is easier.
   3. Has code to preserve environment variables when needed (c.f. nodetool
   script).
   4. Provides a verification method that will verify that all standard
   environment variables are set.

In practice this is a simple 2 line replacement for most boilerplate
blocks.  Examples of the simple case (sstableloader) and a more complex
case (nodetool) are included in the current pull request.

If there is consensus, I will update the other scripts in the bin directory
to utilize the sourced boilerplate and request a full review of the pull
request.