test_class.file: core/src/test/java/gov/nasa/jpl/mudrod/main/TestMudrodEngine.java
test_class.identifier: TestMudrodEngine
test_case.body: @Ignore
    @Test
    public final void testMain() {
      fail("Not yet implemented"); // TODO
    }
test_case.class_method_signature: TestMudrodEngine.testMain()
test_case.full_signature: @Ignore @Test public final void testMain()
test_case.identifier: testMain
test_case.invocations: fail
test_case.modifiers: @Ignore @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMain()
focal_class.declarator: LOG = LoggerFactory.getLogger(MudrodEngine.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(MudrodEngine.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: props = new Properties()
focal_class.modifier: private
focal_class.original_string: private Properties props = new Properties();
focal_class.type: Properties
focal_class.var_name: props
focal_class.declarator: es = null
focal_class.modifier: private
focal_class.original_string: private ESDriver es = null;
focal_class.type: ESDriver
focal_class.var_name: es
focal_class.declarator: spark = null
focal_class.modifier: private
focal_class.original_string: private SparkDriver spark = null;
focal_class.type: SparkDriver
focal_class.var_name: spark
focal_class.declarator: LOG_INGEST = "logIngest"
focal_class.modifier: private static final
focal_class.original_string: private static final String LOG_INGEST = "logIngest";
focal_class.type: String
focal_class.var_name: LOG_INGEST
focal_class.declarator: META_INGEST = "metaIngest"
focal_class.modifier: private static final
focal_class.original_string: private static final String META_INGEST = "metaIngest";
focal_class.type: String
focal_class.var_name: META_INGEST
focal_class.declarator: FULL_INGEST = "fullIngest"
focal_class.modifier: private static final
focal_class.original_string: private static final String FULL_INGEST = "fullIngest";
focal_class.type: String
focal_class.var_name: FULL_INGEST
focal_class.declarator: PROCESSING = "processingWithPreResults"
focal_class.modifier: private static final
focal_class.original_string: private static final String PROCESSING = "processingWithPreResults";
focal_class.type: String
focal_class.var_name: PROCESSING
focal_class.declarator: ES_HOST = "esHost"
focal_class.modifier: private static final
focal_class.original_string: private static final String ES_HOST = "esHost";
focal_class.type: String
focal_class.var_name: ES_HOST
focal_class.declarator: ES_TCP_PORT = "esTCPPort"
focal_class.modifier: private static final
focal_class.original_string: private static final String ES_TCP_PORT = "esTCPPort";
focal_class.type: String
focal_class.var_name: ES_TCP_PORT
focal_class.declarator: ES_HTTP_PORT = "esPort"
focal_class.modifier: private static final
focal_class.original_string: private static final String ES_HTTP_PORT = "esPort";
focal_class.type: String
focal_class.var_name: ES_HTTP_PORT
focal_class.file: core/src/main/java/gov/nasa/jpl/mudrod/main/MudrodEngine.java
focal_class.identifier: MudrodEngine
focal_class.class_method_signature: MudrodEngine.MudrodEngine()
focal_class.full_signature: public  MudrodEngine()
focal_class.identifier: MudrodEngine
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  MudrodEngine()
focal_class.class_method_signature: MudrodEngine.startESDriver()
focal_class.full_signature: public ESDriver startESDriver()
focal_class.identifier: startESDriver
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ESDriver
focal_class.signature: ESDriver startESDriver()
focal_class.class_method_signature: MudrodEngine.startSparkDriver()
focal_class.full_signature: public SparkDriver startSparkDriver()
focal_class.identifier: startSparkDriver
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: SparkDriver
focal_class.signature: SparkDriver startSparkDriver()
focal_class.class_method_signature: MudrodEngine.getConfig()
focal_class.full_signature: public Properties getConfig()
focal_class.identifier: getConfig
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Properties
focal_class.signature: Properties getConfig()
focal_class.class_method_signature: MudrodEngine.getESDriver()
focal_class.full_signature: public ESDriver getESDriver()
focal_class.identifier: getESDriver
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ESDriver
focal_class.signature: ESDriver getESDriver()
focal_class.class_method_signature: MudrodEngine.setESDriver(ESDriver es)
focal_class.full_signature: public void setESDriver(ESDriver es)
focal_class.identifier: setESDriver
focal_class.modifiers: public
focal_class.parameters: (ESDriver es)
focal_class.return: void
focal_class.signature: void setESDriver(ESDriver es)
focal_class.class_method_signature: MudrodEngine.locateConfig()
focal_class.full_signature: private InputStream locateConfig()
focal_class.identifier: locateConfig
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: InputStream
focal_class.signature: InputStream locateConfig()
focal_class.class_method_signature: MudrodEngine.loadConfig()
focal_class.full_signature: public Properties loadConfig()
focal_class.identifier: loadConfig
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Properties
focal_class.signature: Properties loadConfig()
focal_class.class_method_signature: MudrodEngine.decompressSVMWithSGDModel(String archiveName)
focal_class.full_signature: private String decompressSVMWithSGDModel(String archiveName)
focal_class.identifier: decompressSVMWithSGDModel
focal_class.modifiers: private
focal_class.parameters: (String archiveName)
focal_class.return: String
focal_class.signature: String decompressSVMWithSGDModel(String archiveName)
focal_class.class_method_signature: MudrodEngine.startLogIngest()
focal_class.full_signature: public void startLogIngest()
focal_class.identifier: startLogIngest
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startLogIngest()
focal_class.class_method_signature: MudrodEngine.startMetaIngest()
focal_class.full_signature: public void startMetaIngest()
focal_class.identifier: startMetaIngest
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startMetaIngest()
focal_class.class_method_signature: MudrodEngine.startFullIngest()
focal_class.full_signature: public void startFullIngest()
focal_class.identifier: startFullIngest
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startFullIngest()
focal_class.class_method_signature: MudrodEngine.startProcessing()
focal_class.full_signature: public void startProcessing()
focal_class.identifier: startProcessing
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startProcessing()
focal_class.class_method_signature: MudrodEngine.end()
focal_class.full_signature: public void end()
focal_class.identifier: end
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void end()
focal_class.class_method_signature: MudrodEngine.main(String[] args)
focal_class.full_signature: public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_class.class_method_signature: MudrodEngine.loadFullConfig(MudrodEngine me, String dataDir)
focal_class.full_signature: private static void loadFullConfig(MudrodEngine me, String dataDir)
focal_class.identifier: loadFullConfig
focal_class.modifiers: private static
focal_class.parameters: (MudrodEngine me, String dataDir)
focal_class.return: void
focal_class.signature: void loadFullConfig(MudrodEngine me, String dataDir)
focal_class.class_method_signature: MudrodEngine.getSparkDriver()
focal_class.full_signature: public SparkDriver getSparkDriver()
focal_class.identifier: getSparkDriver
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: SparkDriver
focal_class.signature: SparkDriver getSparkDriver()
focal_class.class_method_signature: MudrodEngine.setSparkDriver(SparkDriver sparkDriver)
focal_class.full_signature: public void setSparkDriver(SparkDriver sparkDriver)
focal_class.identifier: setSparkDriver
focal_class.modifiers: public
focal_class.parameters: (SparkDriver sparkDriver)
focal_class.return: void
focal_class.signature: void setSparkDriver(SparkDriver sparkDriver)
focal_method.body: public static void main(String[] args) {
      // boolean options
      Option helpOpt = new Option("h", "help", false, "show this help message");
  
      // log ingest (preprocessing + processing)
      Option logIngestOpt = new Option("l", LOG_INGEST, false, "begin log ingest");
      // metadata ingest (preprocessing + processing)
      Option metaIngestOpt = new Option("m", META_INGEST, false, "begin metadata ingest");
      // ingest both log and metadata
      Option fullIngestOpt = new Option("f", FULL_INGEST, false, "begin full ingest Mudrod workflow");
      // processing only, assuming that preprocessing results is in dataDir
      Option processingOpt = new Option("p", PROCESSING, false, "begin processing with preprocessing results");
  
      // argument options
      Option dataDirOpt = OptionBuilder.hasArg(true).withArgName("/path/to/data/directory").hasArgs(1).withDescription("the data directory to be processed by Mudrod").withLongOpt("dataDirectory")
          .isRequired().create(DATA_DIR);
  
      Option esHostOpt = OptionBuilder.hasArg(true).withArgName("host_name").hasArgs(1).withDescription("elasticsearch cluster unicast host").withLongOpt("elasticSearchHost").isRequired(false)
          .create(ES_HOST);
  
      Option esTCPPortOpt = OptionBuilder.hasArg(true).withArgName("port_num").hasArgs(1).withDescription("elasticsearch transport TCP port").withLongOpt("elasticSearchTransportTCPPort")
          .isRequired(false).create(ES_TCP_PORT);
  
      Option esPortOpt = OptionBuilder.hasArg(true).withArgName("port_num").hasArgs(1).withDescription("elasticsearch HTTP/REST port").withLongOpt("elasticSearchHTTPPort").isRequired(false)
          .create(ES_HTTP_PORT);
  
      // create the options
      Options options = new Options();
      options.addOption(helpOpt);
      options.addOption(logIngestOpt);
      options.addOption(metaIngestOpt);
      options.addOption(fullIngestOpt);
      options.addOption(processingOpt);
      options.addOption(dataDirOpt);
      options.addOption(esHostOpt);
      options.addOption(esTCPPortOpt);
      options.addOption(esPortOpt);
  
      CommandLineParser parser = new GnuParser();
      try {
        CommandLine line = parser.parse(options, args);
        String processingType = null;
  
        if (line.hasOption(LOG_INGEST)) {
          processingType = LOG_INGEST;
        } else if (line.hasOption(PROCESSING)) {
          processingType = PROCESSING;
        } else if (line.hasOption(META_INGEST)) {
          processingType = META_INGEST;
        } else if (line.hasOption(FULL_INGEST)) {
          processingType = FULL_INGEST;
        }
  
        String dataDir = line.getOptionValue(DATA_DIR).replace("\\", "/");
        if (!dataDir.endsWith("/")) {
          dataDir += "/";
        }
  
        MudrodEngine me = new MudrodEngine();
        me.loadConfig();
        me.props.put(DATA_DIR, dataDir);
  
        if (line.hasOption(ES_HOST)) {
          String esHost = line.getOptionValue(ES_HOST);
          me.props.put(MudrodConstants.ES_UNICAST_HOSTS, esHost);
        }
  
        if (line.hasOption(ES_TCP_PORT)) {
          String esTcpPort = line.getOptionValue(ES_TCP_PORT);
          me.props.put(MudrodConstants.ES_TRANSPORT_TCP_PORT, esTcpPort);
        }
  
        if (line.hasOption(ES_HTTP_PORT)) {
          String esHttpPort = line.getOptionValue(ES_HTTP_PORT);
          me.props.put(MudrodConstants.ES_HTTP_PORT, esHttpPort);
        }
  
        me.es = new ESDriver(me.getConfig());
        me.spark = new SparkDriver(me.getConfig());
        loadFullConfig(me, dataDir);
        if (processingType != null) {
          switch (processingType) {
          case PROCESSING:
            me.startProcessing();
            break;
          case LOG_INGEST:
            me.startLogIngest();
            break;
          case META_INGEST:
            me.startMetaIngest();
            break;
          case FULL_INGEST:
            me.startFullIngest();
            break;
          default:
            break;
          }
        }
        me.end();
      } catch (Exception e) {
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp("MudrodEngine: 'dataDir' argument is mandatory. " + "User must also provide an ingest method.", options, true);
        LOG.error("Error whilst parsing command line.", e);
      }
    }
focal_method.class_method_signature: MudrodEngine.main(String[] args)
focal_method.full_signature: public static void main(String[] args)
focal_method.identifier: main
focal_method.invocations: create isRequired withLongOpt withDescription hasArgs withArgName hasArg create isRequired withLongOpt withDescription hasArgs withArgName hasArg create isRequired withLongOpt withDescription hasArgs withArgName hasArg create isRequired withLongOpt withDescription hasArgs withArgName hasArg addOption addOption addOption addOption addOption addOption addOption addOption addOption parse hasOption hasOption hasOption hasOption replace getOptionValue endsWith loadConfig put hasOption getOptionValue put hasOption getOptionValue put hasOption getOptionValue put getConfig getConfig loadFullConfig startProcessing startLogIngest startMetaIngest startFullIngest end printHelp error
focal_method.modifiers: public static
focal_method.parameters: (String[] args)
focal_method.return: void
focal_method.signature: void main(String[] args)