/** * Deploy and run the Samza jobs to execute {@link org.apache.samza.application.SamzaApplication}. * It is non-blocking so it doesn't wait for the application running. * @param externalContext nullable {@link ExternalContext} to pass through to the application */ void run(ExternalContext externalContext);
@Override public void run(ExternalContext externalContext) { runner.run(externalContext); }
@Override public void run() { runner.run(); }
public static void main(String[] args) throws Exception { ApplicationRunnerCommandLine cmdLine = new ApplicationRunnerCommandLine(); OptionSet options = cmdLine.parser().parse(args); Config orgConfig = cmdLine.loadConfig(options); Config config = Util.rewriteConfig(orgConfig); ApplicationRunnerOperation op = cmdLine.getOperation(options); ApplicationRunner appRunner = ApplicationRunners.getApplicationRunner(ApplicationUtil.fromConfig(config), config); switch (op) { case RUN: appRunner.run(null); break; case KILL: appRunner.kill(); break; case STATUS: System.out.println(appRunner.status()); break; default: throw new IllegalArgumentException("Unrecognized operation: " + op); } } }
public static void main(String[] args) throws Exception { ApplicationRunnerCommandLine cmdLine = new ApplicationRunnerCommandLine(); OptionSet options = cmdLine.parser().parse(args); Config orgConfig = cmdLine.loadConfig(options); Config config = Util.rewriteConfig(orgConfig); ApplicationRunnerOperation op = cmdLine.getOperation(options); ApplicationRunner appRunner = ApplicationRunners.getApplicationRunner(ApplicationUtil.fromConfig(config), config); switch (op) { case RUN: appRunner.run(); break; case KILL: appRunner.kill(); break; case STATUS: System.out.println(appRunner.status()); break; default: throw new IllegalArgumentException("Unrecognized operation: " + op); } } }
public static void main(String[] args) throws Exception { ApplicationRunnerCommandLine cmdLine = new ApplicationRunnerCommandLine(); OptionSet options = cmdLine.parser().parse(args); Config orgConfig = cmdLine.loadConfig(options); Config config = Util.rewriteConfig(orgConfig); ApplicationRunnerOperation op = cmdLine.getOperation(options); ApplicationRunner appRunner = ApplicationRunners.getApplicationRunner(ApplicationUtil.fromConfig(config), config); switch (op) { case RUN: appRunner.run(); break; case KILL: appRunner.kill(); break; case STATUS: System.out.println(appRunner.status()); break; default: throw new IllegalArgumentException("Unrecognized operation: " + op); } } }
public static void main(String[] args) throws Exception { ApplicationRunnerCommandLine cmdLine = new ApplicationRunnerCommandLine(); OptionSet options = cmdLine.parser().parse(args); Config orgConfig = cmdLine.loadConfig(options); Config config = Util.rewriteConfig(orgConfig); ApplicationRunnerOperation op = cmdLine.getOperation(options); ApplicationRunner appRunner = ApplicationRunners.getApplicationRunner(ApplicationUtil.fromConfig(config), config); switch (op) { case RUN: appRunner.run(); break; case KILL: appRunner.kill(); break; case STATUS: System.out.println(appRunner.status()); break; default: throw new IllegalArgumentException("Unrecognized operation: " + op); } } }
public static void main(String[] args) throws Exception { ApplicationRunnerCommandLine cmdLine = new ApplicationRunnerCommandLine(); OptionSet options = cmdLine.parser().parse(args); Config orgConfig = cmdLine.loadConfig(options); Config config = Util.rewriteConfig(orgConfig); ApplicationRunnerOperation op = cmdLine.getOperation(options); ApplicationRunner appRunner = ApplicationRunners.getApplicationRunner(ApplicationUtil.fromConfig(config), config); switch (op) { case RUN: appRunner.run(); break; case KILL: appRunner.kill(); break; case STATUS: System.out.println(appRunner.status()); break; default: throw new IllegalArgumentException("Unrecognized operation: " + op); } } }