Start Hello REEF job with local runtime.
@param args command line parameters.
@throws InjectionException configuration error.
554736
public static void main(final String[] args) throws InjectionException {

    final LauncherStatus status = DriverLauncher.getLauncher(RUNTIME_CONFIG).run(DRIVER_CONFIG, JOB_TIMEOUT);

    LOG.log(Level.INFO, "REEF job completed: {0}", status);

    ThreadLogger.logThreads(LOG, Level.FINE, "Threads running at the end of HelloREEF:");
  }
918879
public static void main(String[] args
                          ) throws ClassNotFoundException, IOException, 
                                   InterruptedException {
    if (args.length != 1) {
      System.out.println("Usage: IsolationRunner <path>/job.xml");
      System.exit(1);
    }
    File jobFilename = new File(args[0]);
    if (!jobFilename.exists() || !jobFilename.isFile()) {
      System.out.println(jobFilename + " is not a valid job file.");
      System.exit(1);
    }
    JobConf conf = new JobConf(new Path(jobFilename.toString()));
    TaskAttemptID taskId = TaskAttemptID.forName(conf.get("mapred.task.id"));
    boolean isMap = conf.getBoolean("mapred.task.is.map", true);
    int partition = conf.getInt("mapred.task.partition", 0);
    
    // setup the local and user working directories
    FileSystem local = FileSystem.getLocal(conf);
    LocalDirAllocator lDirAlloc = new LocalDirAllocator("mapred.local.dir");
    File workDirName = new File(lDirAlloc.getLocalPathToRead(
                                  TaskTracker.getLocalTaskDir(
                                    taskId.getJobID().toString(), 
                                    taskId.toString())
                                  + Path.SEPARATOR + "work",
                                  conf). toString());
    local.setWorkingDirectory(new Path(workDirName.toString()));
    FileSystem.get(conf).setWorkingDirectory(conf.getWorkingDirectory());
    
    // set up a classloader with the right classpath
    ClassLoader classLoader = makeClassLoader(conf, workDirName);
    Thread.currentThread().setContextClassLoader(classLoader);
    conf.setClassLoader(classLoader);
    
    Task task;
    if (isMap) {
      Path localSplit = new Path(new Path(jobFilename.toString()).getParent(), 
                                 "split.dta");
      DataInputStream splitFile = FileSystem.getLocal(conf).open(localSplit);
      String splitClass = Text.readString(splitFile);
      BytesWritable split = new BytesWritable();
      split.readFields(splitFile);
      splitFile.close();
      task = new MapTask(jobFilename.toString(), taskId, partition, 
                         splitClass, split, 1, conf.getUser());
    } else {
      int numMaps = conf.getNumMapTasks();
      fillInMissingMapOutputs(local, taskId, numMaps, conf);
      task = new ReduceTask(jobFilename.toString(), taskId, partition, numMaps, 
                            1, conf.getUser());
    }
    task.setConf(conf);
    task.run(conf, new FakeUmbilical());
  }
1228545
public static void main(String[] args) {
    InstancedConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults());
    if (!ConfigurationUtils.masterHostConfigured(conf) && args.length > 0) {
      System.out.println(ConfigurationUtils
          .getMasterHostNotConfiguredMessage("Alluxio fsadmin shell"));
      System.exit(1);
    }
    // Reduce the RPC retry max duration to fall earlier for CLIs
    conf.set(PropertyKey.USER_RPC_RETRY_MAX_DURATION, "5s", Source.DEFAULT);
    FileSystemAdminShell fsAdminShell = new FileSystemAdminShell(conf);
    System.exit(fsAdminShell.run(args));
  }
1000341
public final void run(final String[] args) throws IOException, JDOMException {
    try {
      Parameters parameters = cliArgumentsParser.parse(args);
      if (parameters.getStrategy() == Strategy.TOKENIZE) {
        annotate(parameters);
      } else if (parameters.getStrategy() == Strategy.SERVER) {
        server(parameters);
      } else if (parameters.getStrategy() == Strategy.CLIENT) {
        client(parameters);
      } else {
        System.out.println(String.format(
            "Invalid sub-command [%s]. Sub-commands accepted are: (tok|server|client)",
            parameters.getStrategyString()));
      }
    } catch (final ArgumentParserException e) {
      cliArgumentsParser.handleError(e);
      System.out.println("Run java -jar target/ixa-pipe-tok-" + VERSION
          + ".jar (tok|server|client) -help for details");
      System.exit(1);
    }
  }
493826
public static void main(final String[] args) {
    LOG.log(Level.INFO, "Entering Launch at :::" + new Date());
    try {
      if (args == null || args.length == 0) {
        throw new IllegalArgumentException("No arguments provided, at least a clrFolder should be supplied.");
      }
      final File dotNetFolder = new File(args[0]).getAbsoluteFile();
      final String[] removedArgs = Arrays.copyOfRange(args, 1, args.length);

      final Configuration config = getClientConfiguration(removedArgs);
      final Injector commandLineInjector = Tang.Factory.getTang().newInjector(parseCommandLine(removedArgs));
      final int waitTime = commandLineInjector.getNamedInstance(WaitTimeForDriver.class);
      final int driverMemory = commandLineInjector.getNamedInstance(DriverMemoryInMb.class);
      final boolean isLocal = commandLineInjector.getNamedInstance(Local.class);
      final String driverIdentifier = commandLineInjector.getNamedInstance(DriverIdentifier.class);
      final String jobSubmissionDirectory = commandLineInjector.getNamedInstance(DriverJobSubmissionDirectory.class);
      final boolean submit = commandLineInjector.getNamedInstance(Submit.class);
      final Injector injector = Tang.Factory.getTang().newInjector(config);
      final JobClient client = injector.getInstance(JobClient.class);
      client.setDriverInfo(driverIdentifier, driverMemory, jobSubmissionDirectory);

      if (submit) {
        client.submit(dotNetFolder, true, isLocal, null);
        client.waitForCompletion(waitTime);
      } else {
        client.submit(dotNetFolder, false, isLocal, config);
        client.waitForCompletion(0);
      }


      LOG.info("Done!");
    } catch (final BindException | InjectionException | IOException ex) {
      LOG.log(Level.SEVERE, "Job configuration error", ex);
    }
  }
45167
public static void main(final String[] args) throws BindException, InjectionException, IOException {

    final Configuration runtimeConfiguration = YarnClientConfiguration.CONF.build();

    final LauncherStatus status = HelloREEFHttp.runHelloReef(runtimeConfiguration, HelloREEFHttp.JOB_TIMEOUT);
    LOG.log(Level.INFO, "REEF job completed: {0}", status);
  }
861635
public void run(String[] args) {
		System.out.println("SampleStarter.run(String[])");
		System.out.println("- args.length: " + args.length);
		for (String arg : args) System.out.println("  - " + arg);
		System.out.println(this);
	}
473714
@SuppressWarnings("unchecked")
  public static void main(String[] args) throws IOException {
    JobConf conf = ValueAggregatorJob.createValueAggregatorJob(args
        , new Class[] {WordCountPlugInClass.class});
   
    JobClient.runJob(conf);
  }
85848
@SuppressWarnings("checkstyle:illegalcatch")
  public static void main(final String[] args) {

    LOG.log(Level.INFO, "Entering JavaDriverClientLauncher.main().");

    LOG.log(Level.FINE, "JavaDriverClientLauncher started with user name [{0}]", System.getProperty("user.name"));
    LOG.log(Level.FINE, "JavaDriverClientLauncher started. Assertions are {0} in this process.",
        EnvironmentUtils.areAssertionsEnabled() ? "ENABLED" : "DISABLED");

    if (args.length != 2) {
      final String message = "JavaDriverClientLauncher have two and only two arguments to specify the runtime clock " +
          "configuration path and driver service port";

      throw fatal(message, new IllegalArgumentException(message));
    }

    final JavaDriverClientLauncher launcher = getLauncher(args[0], Integer.parseInt(args[1]));

    Thread.setDefaultUncaughtExceptionHandler(new REEFUncaughtExceptionHandler(launcher.envConfig));
    final Injector injector = TANG.newInjector(launcher.envConfig);
    try {
      final DriverServiceClient driverServiceClient = injector.getInstance(DriverServiceClient.class);
      try (final Clock reef = injector.getInstance(Clock.class)) {
        reef.run();
      } catch (final InjectionException ex) {
        LOG.log(Level.SEVERE, "Unable to configure driver client.");
        driverServiceClient.onInitializationException(ex.getCause() != null ? ex.getCause() : ex);
      } catch (final Throwable t) {
        if (t.getCause() != null && t.getCause() instanceof InjectionException) {
          LOG.log(Level.SEVERE, "Unable to configure driver client.");
          final InjectionException ex = (InjectionException) t.getCause();
          driverServiceClient.onInitializationException(ex.getCause() != null ? ex.getCause() : ex);
        } else {
          throw fatal("Unable run clock.", t);
        }
      }
    } catch (final InjectionException e) {
      throw fatal("Unable initialize driver service client.", e);
    }

    ThreadLogger.logThreads(LOG, Level.FINEST, "Threads running after Clock.close():");

    LOG.log(Level.INFO, "Exiting REEFLauncher.main()");

    System.exit(0); // TODO[REEF-1715]: Should be able to exit cleanly at the end of main()
  }
550601
protected static final Injector init(final String commandName, final String[] args) {
        String usage = commandName + USAGE_PARAMS;
        Switch about = new Switch("a", "about", "display about message");
        Switch help = new Switch("h", "help", "display help message");
        final StringArgument namespace = new StringArgument("s", "namespace", "namespace", true);
        final FileArgument glstringFile = new FileArgument("g", "glstrings", "glstring input file", false);
        final FileArgument identifierFile = new FileArgument("i", "identifiers", "identifier output file", false);
        final StringArgument client = new StringArgument("c", "client", "client implementation, json or xml, default json", false);

        ArgumentList arguments = new ArgumentList(about, help, namespace, glstringFile, identifierFile, client);
        CommandLine commandLine = new CommandLine(args);
        try
        {
            CommandLineParser.parse(commandLine, arguments);
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(usage, null, commandLine, arguments, System.out);
                System.exit(0);
            }
        }
        catch (CommandLineParseException e) {
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(usage, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            Usage.usage(usage, e, commandLine, arguments, System.err);
            System.exit(-1);
        }

        return Guice.createInjector(new CacheGlClientModule(), new AbstractModule() {
            @Override
            protected void configure() {
                bind(String.class).annotatedWith(Namespace.class).toInstance(namespace.getValue());

                if (glstringFile.wasFound()) {
                    bind(File.class).annotatedWith(GlstringFile.class).toInstance(glstringFile.getValue());
                }
                else {
                    bind(File.class).annotatedWith(GlstringFile.class).toProvider(Providers.of((File) null));
                }

                if (identifierFile.wasFound()) {
                    bind(File.class).annotatedWith(IdentifierFile.class).toInstance(identifierFile.getValue());
                }
                else {
                    bind(File.class).annotatedWith(IdentifierFile.class).toProvider(Providers.of((File) null));
                }

                bind(HttpClient.class).to(RestAssuredHttpClient.class);

                if ("xml".equals(client.getValue("json"))) {
                    bind(GlClient.class).to(XmlGlClient.class);
                }
                else {
                    bind(GlClient.class).to(JsonGlClient.class);
                }
            }
        });
    }
49354
public static void main(final String[] args) throws InjectionException, IOException, ParseException {
    final Configuration runtimeConfiguration = LocalRuntimeConfiguration.CONF
        .set(LocalRuntimeConfiguration.MAX_NUMBER_OF_EVALUATORS, MAX_NUMBER_OF_EVALUATORS)
        .build();
    runTaskScheduler(runtimeConfiguration, args);
  }
586163
public static void main(String[] args) {
		if (args == null || args.length == 0) {
			server = com.jfinal.server.jetty.ServerFactory.getServer();
			server.start();
			return ;
		}
		
		// for Eclipse
		if (args.length == 4) {
			String webAppDir = args[0];
			int port = Integer.parseInt(args[1]);
			String context = args[2];
			int scanIntervalSeconds = Integer.parseInt(args[3]);
			server = com.jfinal.server.jetty.ServerFactory.getServer(webAppDir, port, context, scanIntervalSeconds);
			server.start();
			return ;
		}
		
		// for IDEA
		if (args.length == 3) {
			start(args[0], Integer.parseInt(args[1]), args[2]);
			return ;
		}
		
		throw new RuntimeException("Boot parameter error. The right parameter like this: src/main/webapp 80 / 5");
	}
599299
public static void main(String[] args) {
    if (args.length != 0) {
      LOG.info("java -cp {} {}", RuntimeConstants.ALLUXIO_JAR,
          AlluxioJobMaster.class.getCanonicalName());
      System.exit(-1);
    }

    CommonUtils.PROCESS_TYPE.set(alluxio.util.CommonUtils.ProcessType.JOB_MASTER);
    AlluxioJobMasterProcess process;
    try {
      process = AlluxioJobMasterProcess.Factory.create();
    } catch (Throwable t) {
      LOG.error("Failed to create job master process", t);
      // Exit to stop any non-daemon threads.
      System.exit(-1);
      throw t;
    }
    ProcessUtils.run(process);
  }
299881
public static void main(String args[]) throws IOException {
    JobConf job = ValueAggregatorJob.createValueAggregatorJob(args);
    JobClient.runJob(job);
  }
131779
public static void main(String[] args) {
    ExtensionsShell extensionShell =
        new ExtensionsShell(ServerConfiguration.global());
    System.exit(extensionShell.run(args));
  }
338095
public static void main (String[] args) {
    try {
      h2omapper m = new h2omapper();
      m.run(null);
    }
    catch (Exception e) {
      System.out.println (e);
    }
  }
767226
public static void main(String[] args) {

        DDLGenerationUtility util = new DDLGenerationUtility();

        // No task handlers since this is a single function script.
        // At least it is right now.
        int rc = util.runProgram(args);

        System.exit(rc);
    }