Class SbkGemParameters
- All Implemented Interfaces:
GemParameterOptions, GemParameters, GetArguments, io.sbk.params.ActionParameter, io.sbk.params.InputOptions, io.sbk.params.InputParameterOptions, io.sbk.params.ParameterOptions, io.sbk.params.Parameters, io.sbk.params.ParsedOptions, io.sbk.params.ParseInputOptions, io.sbk.params.ThreadTypeParameter
Extends SbkDriversParameters to include SBK driver/logger help, and adds GEM-specific
options for remote orchestration (nodes, SSH creds/port, SBK and Java deployment,
automatic runtime deployment/cleanup,
local SBM host/port/idle sleep). Populates typed getters and constructs ConnectionConfig
instances for each target node.
Supported options (help text shows defaults from GemConfig):
- -nodes: comma/space/newline-separated hostnames or host:port endpoints
- -gemuser, -gempass, -gemport
- -packagescleanup, -fullcopy, -javadir
- -localhost
- -sbmport, -sbmsleepms
- -totalrecords
- -totalthroughput
-
Field Summary
Fields inherited from class io.sbk.params.impl.SbkParameters
MPSC_QUEUE_OPTION -
Constructor Summary
ConstructorsConstructorDescriptionSbkGemParameters(String name, String[] drivers, String[] loggers, @NotNull GemConfig config, int sbmPort, int sbmIdleSleepMilliSeconds) Construct GEM parameters with defaults and register GEM options. -
Method Summary
Modifier and TypeMethodDescriptionGet the optional remote Java home.to get Sbk directory.longGet the configured record value.booleanCheck whether every inactive non-current SBK-GEM-managed runtime and local cached bundle should be removed.voidParse GEM options, validate the launcher-selected SBK distribution, and build the connection set.Methods inherited from class io.sbk.params.impl.SbkParameters
getAction, getIdleSleepMilliSeconds, getIdleTimeoutSeconds, getReadersCount, getReadersStep, getReadersStepSeconds, getRecordSize, getRecordsPerSec, getRecordsPerSync, getThreadType, getTimeoutMS, getTotalSecondsToRun, getWritersCount, getWritersStep, getWritersStepSeconds, isMpscQueueEnabled, loadPerlConfigMethods inherited from class io.sbk.params.impl.SbkInputOptions
addOption, getHelpText, getOptionValue, getOptionValue, hasOption, hasOptionValueMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.sbk.params.ActionParameter
getActionMethods inherited from interface GemParameters
getConnections, getLocalHost, getSbmIdleSleepMilliSeconds, getSbmPort, getTotalThroughput, isLocalHostOption, isTotalRecordsOption, isTotalThroughputOptionMethods inherited from interface GetArguments
getOptionsArgs, getParsedArgsMethods inherited from interface io.sbk.params.InputOptions
addOption, hasOptionMethods inherited from interface io.sbk.params.Parameters
getIdleSleepMilliSeconds, getIdleTimeoutSeconds, getReadersCount, getReadersStep, getReadersStepSeconds, getRecordSize, getRecordsPerSec, getRecordsPerSync, getTimeoutMS, getTotalSecondsToRun, getWritersCount, getWritersStep, getWritersStepSeconds, isMpscQueueEnabledMethods inherited from interface io.sbk.params.ParsedOptions
getHelpText, getOptionValue, getOptionValue, hasOptionValue, printHelpMethods inherited from interface io.sbk.params.ThreadTypeParameter
getThreadType
-
Constructor Details
-
SbkGemParameters
public SbkGemParameters(String name, String[] drivers, String[] loggers, @NotNull @NotNull GemConfig config, int sbmPort, int sbmIdleSleepMilliSeconds) Construct GEM parameters with defaults and register GEM options.- Parameters:
name- benchmark/application name used in helpdrivers- storage driver class names for help listingloggers- logger class names for help listingconfig- configuration backing defaults and parsed valuessbmPort- SBM port defaultsbmIdleSleepMilliSeconds- SBM idle sleep default (ms)
-
-
Method Details
-
parseArgs
public void parseArgs(String[] args) throws org.apache.commons.cli.ParseException, IllegalArgumentException, io.sbk.exception.HelpException Parse GEM options, validate the launcher-selected SBK distribution, and build the connection set.Derives
parsedArgsandconnections. Validates that the SBK application home supplied internally fromsbk.appHomeexists and contains the standard executable command.- Specified by:
parseArgsin interfaceio.sbk.params.ParseInputOptions- Overrides:
parseArgsin classio.sbk.params.impl.SbkParameters- Parameters:
args- command-line arguments to parse- Throws:
org.apache.commons.cli.ParseException- if parsing of arguments fails or required values are invalidIllegalArgumentException- if SBK directory/command checks fail or other validation errors occurio.sbk.exception.HelpException- if help text needs to be displayed by upstream handling
-
getTotalRecords
public long getTotalRecords()Get the configured record value. The GEM aggregate value is returned when-totalrecordsis supplied; otherwise, this returns the standard SBK record value. The aggregate value is a fixed count without-secondsand a records/second rate with-seconds.- Specified by:
getTotalRecordsin interfaceio.sbk.params.Parameters- Overrides:
getTotalRecordsin classio.sbk.params.impl.SbkParameters- Returns:
- aggregate or standard record value, according to the selected option
-
getSbkDir
Description copied from interface:GemParametersto get Sbk directory.- Specified by:
getSbkDirin interfaceGemParameters- Returns:
- Sbk directory.
-
getJavaDir
Description copied from interface:GemParametersGet the optional remote Java home.- Specified by:
getJavaDirin interfaceGemParameters- Returns:
- remote Java home, or an empty value when automatic discovery is used
-
isPackagesCleanup
public boolean isPackagesCleanup()Description copied from interface:GemParametersCheck whether every inactive non-current SBK-GEM-managed runtime and local cached bundle should be removed.- Specified by:
isPackagesCleanupin interfaceGemParameters- Returns:
- true when managed runtime cleanup is enabled
-