docs: public Engine parseCommandLine(final String[] args) throws ParseException, IOException {
          // create the command line parser
          CommandLineParser parser = new GnuParser();
  
          // create the Options
          final Options options = new Options()
                  .addOption("h", "help", false, "print help.")
                  .addOption("i", "inputfile", true, "the scxml input file")
                  .addOption("n", "numberoftimes", true,
                          "an integer, the number of TIME to run the template of a row")
                  .addOption("H", "hdfssequencefile", true,
                          "the path of the hdfs sequence file to write to")
                  .addOption("L", "loglevel", true,
                          "set the log level")
                  .addOption("s", "maxscenarios", true,
                          "Maximum number of scenarios to generate. Default 10,000")
                  .addOption("m", "minbootstrapstates", true,
                          "Minimum number of states to explore using BFS before using parallel DFS search. Default is 0"
                                  + " (no BFS).");
  
          CommandLine cmd = parser.parse(options, args);
          Engine chartExec = new SCXMLEngine();
          hdfsDist = new HDFSDistributor();
  
          if (cmd.hasOption("i")) {
              Path inFile = new Path(cmd.getOptionValue('i'));
              FileSystem fs = FileSystem.get(this.getConf());
              FSDataInputStream in = fs.open(inFile);
              String model = IOUtils.toString(in, "UTF-8");
  
              chartExec.setModelByText(model);
              hdfsDist.setStateMachineText(model);
          } else {
              System.err.println("\nERROR: you must state option -i with an input file\n");
          }
  
          int n = 1;
          if (cmd.hasOption("n")) {
              n = Integer.valueOf(cmd.getOptionValue("n"));
          }
  
          if (cmd.hasOption("h") || cmd.getOptions().length == 0) {
              printHelp(options);
          }
  
          if (cmd.hasOption('L')) {
              LogInitializer.initialize(cmd.getOptionValue('L'));
          } else {
              LogInitializer.initialize("WARN");
          }
  
          if (cmd.hasOption('m')) {
              String stringValue = cmd.getOptionValue('m');
              if (StringUtils.isNotEmpty(stringValue)) {
                  chartExec.setBootstrapMin(Integer.parseInt(stringValue));
              } else {
                  System.err.println("Unparsable numeric value for option 'm':" + stringValue);
              }
          }
  
          long maxLines = 0;
          if (cmd.hasOption('s')) {
              String stringValue = cmd.getOptionValue('s');
              maxLines = Long.valueOf(stringValue);
  
              if (StringUtils.isNotEmpty(stringValue)) {
                  hdfsDist.setMaxNumberOfLines(maxLines);
              } else {
                  System.err.println("Unparsable numeric value for option 's':" + stringValue);
              }
          } else if (!cmd.hasOption('s')) {
              maxLines = 10000;
              hdfsDist.setMaxNumberOfLines(maxLines);
          }
  
          LineCountManager jetty = new LineCountManager(maxLines, 500000);
          jetty.prepareServer();
          jetty.prepareStatus();
          hdfsDist = hdfsDist.setFileRoot("brownbag_demo").setReportingHost(jetty.getHostName()
                  + ":" + jetty.getListeningPort());
  
          return chartExec;
      }