Class SbkGemParameters

java.lang.Object
io.sbk.params.impl.SbkInputOptions
io.sbk.params.impl.SbkParameters
io.sbk.params.impl.SbkDriversParameters
io.gem.params.impl.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

public final class SbkGemParameters extends io.sbk.params.impl.SbkDriversParameters implements GemParameterOptions
GEM (Group Execution Monitor) parameters and argument parsing.

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

    Constructors
    Constructor
    Description
    SbkGemParameters(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 Type
    Method
    Description
    Get the optional remote Java home.
    to get Sbk directory.
    long
    Get the configured record value.
    boolean
    Check whether every inactive non-current SBK-GEM-managed runtime and local cached bundle should be removed.
    void
    parseArgs(String[] args)
    Parse 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, loadPerlConfig

    Methods inherited from class io.sbk.params.impl.SbkInputOptions

    addOption, getHelpText, getOptionValue, getOptionValue, hasOption, hasOptionValue

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.sbk.params.ActionParameter

    getAction

    Methods inherited from interface GetArguments

    getOptionsArgs, getParsedArgs

    Methods inherited from interface io.sbk.params.InputOptions

    addOption, hasOption

    Methods inherited from interface io.sbk.params.Parameters

    getIdleSleepMilliSeconds, getIdleTimeoutSeconds, getReadersCount, getReadersStep, getReadersStepSeconds, getRecordSize, getRecordsPerSec, getRecordsPerSync, getTimeoutMS, getTotalSecondsToRun, getWritersCount, getWritersStep, getWritersStepSeconds, isMpscQueueEnabled

    Methods inherited from interface io.sbk.params.ParsedOptions

    getHelpText, getOptionValue, getOptionValue, hasOptionValue, printHelp

    Methods 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 help
      drivers - storage driver class names for help listing
      loggers - logger class names for help listing
      config - configuration backing defaults and parsed values
      sbmPort - SBM port default
      sbmIdleSleepMilliSeconds - 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 parsedArgs and connections. Validates that the SBK application home supplied internally from sbk.appHome exists and contains the standard executable command.

      Specified by:
      parseArgs in interface io.sbk.params.ParseInputOptions
      Overrides:
      parseArgs in class io.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 invalid
      IllegalArgumentException - if SBK directory/command checks fail or other validation errors occur
      io.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 -totalrecords is supplied; otherwise, this returns the standard SBK record value. The aggregate value is a fixed count without -seconds and a records/second rate with -seconds.
      Specified by:
      getTotalRecords in interface io.sbk.params.Parameters
      Overrides:
      getTotalRecords in class io.sbk.params.impl.SbkParameters
      Returns:
      aggregate or standard record value, according to the selected option
    • getSbkDir

      public String getSbkDir()
      Description copied from interface: GemParameters
      to get Sbk directory.
      Specified by:
      getSbkDir in interface GemParameters
      Returns:
      Sbk directory.
    • getJavaDir

      public String getJavaDir()
      Description copied from interface: GemParameters
      Get the optional remote Java home.
      Specified by:
      getJavaDir in interface GemParameters
      Returns:
      remote Java home, or an empty value when automatic discovery is used
    • isPackagesCleanup

      public boolean isPackagesCleanup()
      Description copied from interface: GemParameters
      Check whether every inactive non-current SBK-GEM-managed runtime and local cached bundle should be removed.
      Specified by:
      isPackagesCleanup in interface GemParameters
      Returns:
      true when managed runtime cleanup is enabled