public void start() throws IOException, InterruptedException {
    startPartition = Integer.parseInt(cmd.getOptionValue(OPT_SHORT_START_PARTITION));
    endPartition = Integer.parseInt(cmd.getOptionValue(OPT_SHORT_END_PARTITION));
    totalEvents = Integer.parseInt(cmd.getOptionValue(OPT_SHORT_NUM_EVENTS));
    String propsFile = cmd.getOptionValue(OPT_SHORT_PROPERTIES_FILE);
    streamId = cmd.getOptionValue(OPT_SHORT_STREAM);
    Properties props = new Properties();
    props.load(new FileInputStream(propsFile));
    addMoreSystemConfigs(props);
    config = convertToSamzaConfig(props);
    systemName = config.get(String.format(CFG_STREAM_SYSTEM_NAME, streamId));
    String systemFactory = config.get(String.format(CFG_SYSTEM_FACTORY, systemName));
    physicalStreamName = config.get(String.format(CFG_PHYSICAL_STREAM_NAME, streamId));

    factory = ReflectionUtil.getObj(systemFactory, SystemFactory.class);
  }
Base class for the samza benchmark tests
samza-tools/src/main/java/org/apache/samza/tools/benchmark/AbstractSamzaBench.java