class PythonShellParser {

	static List<String> parseYarn(String[] args) {
		String[] params = new String[args.length - 1];
		System.arraycopy(args, 1, params, 0, params.length);
		CommandLine commandLine = parse(YARN_OPTIONS, params);
		if (commandLine.hasOption(OPTION_HELP.getOpt())) {
			printYarnHelp();
			System.exit(0);
		}
		List<String> options = new ArrayList<>();
		options.add(args[0]);
		options.add("-m");
		options.add("yarn-cluster");
		constructYarnOption(options, OPTION_JM_MEMORY, commandLine);
		constructYarnOption(options, OPTION_NAME, commandLine);
		constructYarnOption(options, OPTION_QUEUE, commandLine);
		constructYarnOption(options, OPTION_SLOTS, commandLine);
		constructYarnOption(options, OPTION_TM_MEMORY, commandLine);
		return options;
	}

}