public static void main(String... args) {
		ClientApplication app = new ClientApplication();
		
		// command-line commands
		List<Command> cmdCommands = new ArrayList<Command>();
		cmdCommands.add(new YarnPushCommand());
		cmdCommands.add(new YarnPushedCommand());
		cmdCommands.add(new YarnSubmitCommand());
		cmdCommands.add(new YarnSubmittedCommand(new SubmittedOptionHandler("XD")));
		cmdCommands.add(new YarnKillCommand());
		cmdCommands.add(new XdYarnAdminInfoCommand());
		cmdCommands.add(new YarnClustersInfoCommand());
		cmdCommands.add(new YarnClusterInfoCommand());
		cmdCommands.add(new XdYarnClusterCreateCommand());
		cmdCommands.add(new YarnClusterStartCommand());
		cmdCommands.add(new YarnClusterStopCommand());
		cmdCommands.add(new YarnClusterModifyCommand());
		cmdCommands.add(new YarnClusterDestroyCommand());		
		app.registerCommands(cmdCommands);

		// shell commands, push not supported in shell
		List<Command> shellCommands = new ArrayList<Command>();
		shellCommands.add(new YarnPushedCommand());
		shellCommands.add(new YarnSubmitCommand());
		shellCommands.add(new YarnSubmittedCommand(new SubmittedOptionHandler("XD")));
		shellCommands.add(new YarnKillCommand());
		shellCommands.add(new XdYarnAdminInfoCommand());
		shellCommands.add(new YarnClustersInfoCommand());
		shellCommands.add(new YarnClusterInfoCommand());
		shellCommands.add(new XdYarnClusterCreateCommand());
		shellCommands.add(new YarnClusterStartCommand());
		shellCommands.add(new YarnClusterStopCommand());
		shellCommands.add(new YarnClusterModifyCommand());
		shellCommands.add(new YarnClusterDestroyCommand());		
		app.registerCommand(new ShellCommand(shellCommands));
		
		app.doMain(args);
	}
Cli for controlling XD instances on an application master.

@author Janne Valkealahti
spring-xd-yarn/spring-xd-yarn-client/src/main/java/org/springframework/xd/yarn/ClientApplication.java