Entry point for the execution of a python plan.

@param args planPath[ package1[ packageX[ - parameter1[ parameterX]]]]
@throws Exception
437400
public static void main(String[] args) throws Exception {
		Configuration globalConfig = GlobalConfiguration.loadConfiguration();
		PythonPlanBinder binder = new PythonPlanBinder(globalConfig);
		try {
			binder.runPlan(args);
		} catch (Exception e) {
			System.out.println("Failed to run plan: " + e.getMessage());
			LOG.error("Failed to run plan.", e);
		}
	}
48970
public static void main(String[] args) throws Exception {
    AlluxioConfiguration alluxioConf = new InstancedConfiguration(ConfigurationUtils.defaults());
    SparkIntegrationChecker checker = new SparkIntegrationChecker();
    JCommander jCommander = new JCommander(checker, args);
    jCommander.setProgramName("SparkIntegrationChecker");

    // Create a file to save user-facing messages
    try (PrintWriter reportWriter = CheckerUtils.initReportFile()) {
      // Start the Java Spark Context
      SparkConf conf = new SparkConf().setAppName(SparkIntegrationChecker.class.getName());
      JavaSparkContext sc = new JavaSparkContext(conf);

      checker.printConfigInfo(conf, reportWriter);
      Status resultStatus = checker.run(sc, reportWriter, alluxioConf);
      checker.printResultInfo(resultStatus, reportWriter);
      reportWriter.flush();
      System.exit(resultStatus.equals(Status.SUCCESS) ? 0 : 1);
    }
  }
797392
public static void main(String[] args) throws Exception {
        OptionParser parser = null;
        OptionSet options = null;
        try {
            parser = getParser();
            options = parser.parse(args);
        } catch(OptionException oe) {
            parser.printHelpOn(System.out);
            printUsageAndDie("Exception when parsing arguments : " + oe.getMessage());
            return;
        }

        /* validate options */
        if(options.has("help")) {
            parser.printHelpOn(System.out);
            printUsage();
            return;
        }
        if(!options.hasArgument("url") || !options.hasArgument("in-dir")
           || !options.hasArgument("out-dir")) {
            parser.printHelpOn(System.out);
            printUsageAndDie("Missing a required argument.");
            return;
        }

        String url = (String) options.valueOf("url");

        String inDir = (String) options.valueOf("in-dir");
        Utils.mkdirs(new File(inDir));

        String outDir = (String) options.valueOf("out-dir");
        Utils.mkdirs(new File(outDir));

        List<String> storeNames = null;
        if(options.hasArgument("store-names")) {
            @SuppressWarnings("unchecked")
            List<String> list = (List<String>) options.valuesOf("store-names");
            storeNames = list;
        }

        Integer keyParallelism = DEFAULT_KEY_PARALLELISM;
        if(options.hasArgument("parallelism")) {
            keyParallelism = (Integer) options.valueOf("parallelism");
        }

        Integer progressPeriodOps = DEFAULT_PROGRESS_PERIOD_OPS;
        if(options.hasArgument("progress-period-ops")) {
            progressPeriodOps = (Integer) options.valueOf("progress-period-ops");
        }

        Integer outputBatchSize = DEFAULT_OUTPUT_BATCH_SIZE;
        if(options.hasArgument("output-batch-size")) {
            outputBatchSize = (Integer) options.valueOf("output-batch-size");
        }

        boolean details = options.has("details");

        try {
            KeyVersionFetcherCLI sampler = new KeyVersionFetcherCLI(url,
                                                                    inDir,
                                                                    outDir,
                                                                    storeNames,
                                                                    keyParallelism,
                                                                    progressPeriodOps,
                                                                    outputBatchSize,
                                                                    details);

            try {
                if(!sampler.sampleStores()) {
                    logger.error("Key-versions were not successfully sampled from some stores.");
                }
            } finally {
                sampler.stop();
            }

        } catch(Exception e) {
            logger.error("Exception during key-version sampling: ", e);
        }
    }
906482
@Override
	public JobExecutionResult executePlan(Plan plan) throws Exception {
		if (plan == null) {
			throw new IllegalArgumentException("The plan may not be null.");
		}

		JobWithJars p = new JobWithJars(plan, this.jarFiles, this.globalClasspaths);
		return executePlanWithJars(p);
	}
1125427
public static void main(final String args[]) {
        int exitCode = 1;
        final Setup setup = new Setup();
        try {
            setup.execute(args);
            exitCode = 0;
        } catch (Throwable exc) {
            System.err.println("ERROR: " + exc.getMessage());
        }
        System.exit(exitCode);
    }
1335189
public static void main(String argv[]) throws Exception {
    try {
      Configuration conf = new Configuration();
      UtilizationReporter utilizationReporter = 
              new UtilizationReporter(conf);
      utilizationReporter.start();
    } catch (Throwable e) {
      System.err.println(e);
      LOG.error(StringUtils.stringifyException(e));
      System.exit(-1);
    }
  }
148838
public static void main(String[] args) throws Exception {

		final ParameterTool params = ParameterTool.fromArgs(args);

		// set up the execution environment
		final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

		// get input data
		DataStream<String> text;
		if (params.has("input")) {
			// read the text file from given input path
			text = env.readTextFile(params.get("input"));
		} else {
			System.out.println("Executing WindowWordCount example with default input data set.");
			System.out.println("Use --input to specify file input.");
			// get default test text data
			text = env.fromElements(WordCountData.WORDS);
		}

		// make parameters available in the web interface
		env.getConfig().setGlobalJobParameters(params);

		final int windowSize = params.getInt("window", 10);
		final int slideSize = params.getInt("slide", 5);

		DataStream<Tuple2<String, Integer>> counts =
		// split up the lines in pairs (2-tuples) containing: (word,1)
		text.flatMap(new WordCount.Tokenizer())
				// create windows of windowSize records slided every slideSize records
				.keyBy(0)
				.countWindow(windowSize, slideSize)
				// group by the tuple field "0" and sum up tuple field "1"
				.sum(1);

		// emit result
		if (params.has("output")) {
			counts.writeAsText(params.get("output"));
		} else {
			System.out.println("Printing result to stdout. Use --output to specify output path.");
			counts.print();
		}

		// execute program
		env.execute("WindowWordCount");
	}
131921
public static void main(final String... args) throws Exception {
        try (ConfigurableApplicationContext context = SpringApplication.run(Application.class, args)) {
            log.info("Arguments: {}", Arrays.asList(args));

            try {
                context.getBean(Application.class).run(context);
            } catch (Exception e) {
                log.error("Exception in command execution", e);
            }
        }
    }
1136728
public static void main(String[] args) throws Exception {

        KamManager app = new KamManager(args);
        app.run();
    }
1197445
public static void main(String[] args) throws Exception {
    // Parse the command line arguments.
    final List<String> unknown = new ArrayList<>();
    final Namespace namespace = parseArgs(args, unknown);
    final Namespace extraArgs = parseUnknown(unknown);
    extraArgs.getAttrs().forEach((key, value) -> System.setProperty(key, value.toString()));

    final Logger logger = createLogger(namespace);

    final Atomix atomix = buildAtomix(namespace);
    atomix.start().join();
    logger.info("Atomix listening at {}", atomix.getMembershipService().getLocalMember().address());

    final ManagedRestService rest = buildRestService(atomix, namespace);
    rest.start().join();
    logger.warn("The Atomix HTTP API is BETA and is intended for development and debugging purposes only!");
    logger.info("HTTP server listening at {}", rest.address());

    synchronized (Atomix.class) {
      while (atomix.isRunning()) {
        Atomix.class.wait();
      }
    }
  }
661644
public int run (String args[]) throws Exception {
    Configuration conf = new Configuration();
    String[] otherArgs = new GenericOptionsParser(conf, args).
                              getRemainingArgs();
    if (otherArgs.length != 2) {
      System.err.println("Usage: sum <numRecords> " +
        "<numReduceTasks>");
      ToolRunner.printGenericCommandUsage(System.err);
      return -1;
    }
    int numRecords = Integer.parseInt(otherArgs[0]);
    int numReduceTasks = Integer.parseInt(otherArgs[1]);

    System.out.println("numRecords: " +  numRecords +
      " numReduceTasks: " + numReduceTasks);

    JobConf jobConf = new JobConf(this.getConf(), SumJob.class);
    final FileSystem fs = FileSystem.get(jobConf);

    if (!fs.mkdirs(TMP_DIR)) {
      throw new IOException("Cannot create input directory " + TMP_DIR);
    }

    final Path inFile = new Path(TMP_DIR, "inp");

    // If the input directory already exists, the Job would assume that the
    // input directory has the right input files, and would not create them
    // again.
    if (!fs.exists(inFile)) {
      SequenceFile.Writer writer = SequenceFile.createWriter(fs, jobConf, inFile,
        LongWritable.class, LongWritable.class);

      for (int i = 1; i <= numRecords; i++) {
        writer.append(
          new LongWritable(i%numReduceTasks ),
          new LongWritable(i));
      }
      writer.close();
    }

    final Path outDir = new Path(TMP_DIR, "out");
    if (fs.exists(outDir)) {
      throw new IOException("Tmp directory " + fs.makeQualified(outDir)
        + " already exists.  Please remove it first.");
    }

    SequenceFileInputFormat.setInputPaths(jobConf, inFile);
    FileOutputFormat.setOutputPath(jobConf, outDir);
    jobConf.setJobName("sum");
    jobConf.setInputFormat(SequenceFileInputFormat.class);
    jobConf.setOutputFormat(SequenceFileOutputFormat.class);
    jobConf.setMapperClass(MyMapper.class);
    jobConf.setCombinerClass(MyReducer.class);
    jobConf.setReducerClass(MyReducer.class);
    jobConf.setOutputKeyClass(LongWritable.class);
    jobConf.setOutputValueClass(LongWritable.class);
    jobConf.setNumReduceTasks(numReduceTasks);

    final long startTime = System.currentTimeMillis();
    JobClient.runJob(jobConf);
    final double duration = (System.currentTimeMillis() - startTime)/1000.0;
    System.out.println("Job Finished in " + duration + " seconds");

    // Read outputs
    Long finalSum = new Long(0);
    // Get the list of all the files which are in the output directory
    FileStatus fileStatuses[] = fs.listStatus(outDir);
    for (FileStatus fileStatus : fileStatuses) {
      // If the file name starts with "part", read it.
      if (fileStatus.getPath().getName().startsWith("part")) {
        Path outFile = fileStatus.getPath();
        LongWritable key = new LongWritable();
        LongWritable sum = new LongWritable();
        SequenceFile.Reader reader = new SequenceFile.Reader(fs, outFile,
                                                              jobConf);
        try {
          reader.next(key, sum);
          finalSum += sum.get();
        } finally {
          reader.close();
        }
      }
    }

    System.err.println("Sum: " + finalSum);
    Long expectedSum = new Long(((long)numRecords * (numRecords + 1)) / 2);
    if (finalSum.equals(expectedSum)) {
      System.err.println("Job Succeeded!");
      return 0;
    }
    System.err.println("Job Failed! Expected Sum: " + expectedSum);
    return 1;
  }
769905
public static void main(String[] args) throws Exception {
        if (args.length < 1 || args.length > 2) {
            throw new IOException("One or two arguments expected.");
        }
        ServerConfiguration config =
                new ServerConfigurationParser(new FileInputStream(new File(args[0])))
                        .parse();
        if (args.length == 2) {
            Properties props = new Properties();
            props.load(new FileInputStream(new File(args[1])));
            config.applyProperties(props);
        }
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        config.serialize(out);
        String content = new String(out.toByteArray(), "UTF-8");
        System.out.println(content);
    }
400068
public static void main(String[] args) throws Exception {

        CmsRemoteShellClient client = new CmsRemoteShellClient(args);
        client.run();
    }
1304158
public static CommandLine parse(Options options, String... args) throws Exception {
        return CommandLineParser.parse(options, args);
    }
1193180
public void run(String... args) throws Exception {
        List<String> parameters = parseCommandLine(args);
        if (!parameters.isEmpty()) {
            runClassicRunner(parameters);
        }
    }
1270315
public void run(String[] args) throws Exception {
    ServerConfiguration.Builder configBuilder = ServerConfiguration.newBuilder();
    ServerConfiguration config;
    try {
      config = configBuilder.build(args);
    } catch (Exception e) {
      System.out.println(e.getMessage());
      configBuilder.printUsage();
      return;
    }

    final Server server = newServer(config);
    server.start();

    System.out.println("QPS Server started on " + config.address);

    Runtime.getRuntime().addShutdownHook(new Thread() {
      @Override
      @SuppressWarnings("CatchAndPrintStackTrace")
      public void run() {
        try {
          System.out.println("QPS Server shutting down");
          server.shutdown();
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    });
    server.awaitTermination();
  }
68625
public static void main(String[] args) throws Exception {

		ParameterTool params = ParameterTool.fromArgs(args);

		final int numPages = params.getInt("numPages", PageRankData.getNumberOfPages());
		final int maxIterations = params.getInt("iterations", 10);

		// set up execution environment
		final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

		// make the parameters available to the web ui
		env.getConfig().setGlobalJobParameters(params);

		// get input data
		DataSet<Long> pagesInput = getPagesDataSet(env, params);
		DataSet<Tuple2<Long, Long>> linksInput = getLinksDataSet(env, params);

		// assign initial rank to pages
		DataSet<Tuple2<Long, Double>> pagesWithRanks = pagesInput.
				map(new RankAssigner((1.0d / numPages)));

		// build adjacency list from link input
		DataSet<Tuple2<Long, Long[]>> adjacencyListInput =
				linksInput.groupBy(0).reduceGroup(new BuildOutgoingEdgeList());

		// set iterative data set
		IterativeDataSet<Tuple2<Long, Double>> iteration = pagesWithRanks.iterate(maxIterations);

		DataSet<Tuple2<Long, Double>> newRanks = iteration
				// join pages with outgoing edges and distribute rank
				.join(adjacencyListInput).where(0).equalTo(0).flatMap(new JoinVertexWithEdgesMatch())
				// collect and sum ranks
				.groupBy(0).aggregate(SUM, 1)
				// apply dampening factor
				.map(new Dampener(DAMPENING_FACTOR, numPages));

		DataSet<Tuple2<Long, Double>> finalPageRanks = iteration.closeWith(
				newRanks,
				newRanks.join(iteration).where(0).equalTo(0)
				// termination condition
				.filter(new EpsilonFilter()));

		// emit result
		if (params.has("output")) {
			finalPageRanks.writeAsCsv(params.get("output"), "\n", " ");
			// execute program
			env.execute("Basic Page Rank Example");
		} else {
			System.out.println("Printing result to stdout. Use --output to specify output path.");
			finalPageRanks.print();
		}
	}