Class NBCLIArgsFile
java.lang.Object
io.nosqlbench.engine.cli.NBCLIArgsFile
Synopsis
ArgsFile is a command-line modifier which can take linked list of command args and modify it, and/or modify argsfile refrenced in this way.ArgsFile Selection
During processing, any occurence of '--argsfile' selects the active argsfile and loads it into the command line in place of the '--argsfile' argument. By default the args file will be loaded if it exists, and a warning will be given if it does not. The '--argsfile-required <somepath>' version will throw an error if the args file is not present, but it will not report any warnings or details otherwise. The `--argsfile-optional <somepath> version will not throw an error if the args file is not present, and it will not report any warnings or details otherwise. A prefix command line can be given to ArgsFile to pre-load any settings. In this way it is possible to easily provide a default args file which will be loaded. For example, A prefix command of '--argsfile-optional <somepath>' will load options if they are available in the specified file, but will otherwise provide no feedback to the user.ArgsFile Injection
When an argsfile is loaded, it reads a command from each line into the current position of the command line. No parsing is done. Blank lines are ignored. Newlines are used as the argument delimiter, and lines that end with a backslash before the newline are automatically joined together.ArgsFile Diagnostics
All modifications to the command line should be reported to the logging facility at INFO level. This assumes that the calling layer wants to inform users of command line injections, and that the user can select to be notified of warnings only if desired.Environment Variables
Simple environment variable substitution is attempted for any pattern which appears as '$' followed by all uppercase letters and underscores. Any references of this type which are not resolvable will cause an error to be thrown.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprocess(LinkedList<String> commandline) Indicate which words are invalid for the purposes of matching trailing parts of arguments.
-
Field Details
-
ARGS_FILE
- See Also:
-
ARGS_FILE_OPTIONAL
- See Also:
-
ARGS_FILE_REQUIRED
- See Also:
-
ARGS_PIN
- See Also:
-
ARGS_UNPIN
- See Also:
-
-
Constructor Details
-
NBCLIArgsFile
public NBCLIArgsFile()
-
-
Method Details
-
preload
-
reserved
Indicate which words are invalid for the purposes of matching trailing parts of arguments. The provided words will not be considered as valid values to arguments in any case.- Parameters:
isReserved- A test to check whether a word is reserved- Returns:
- this ArgsFile, for method chaining
-
process
-
process
-