use of org.apache.samza.util.CommandLine in project samza by apache.
the class RepartitionExample method main.
// local execution mode
public static void main(String[] args) throws Exception {
CommandLine cmdLine = new CommandLine();
Config config = cmdLine.loadConfig(cmdLine.parser().parse(args));
LocalApplicationRunner localRunner = new LocalApplicationRunner(config);
localRunner.run(new RepartitionExample());
}
use of org.apache.samza.util.CommandLine in project samza by apache.
the class SamzaRestService method parseConfig.
/**
* Reads a {@link org.apache.samza.config.Config} from command line parameters.
* @param args the command line parameters supported by {@link org.apache.samza.util.CommandLine}.
* @return the parsed {@link org.apache.samza.config.Config}.
*/
private static SamzaRestConfig parseConfig(String[] args) {
CommandLine cmd = new CommandLine();
OptionSet options = cmd.parser().parse(args);
MapConfig cfg = cmd.loadConfig(options);
return new SamzaRestConfig(new MapConfig(cfg));
}
use of org.apache.samza.util.CommandLine in project samza by apache.
the class BroadcastExample method main.
// local execution mode
public static void main(String[] args) throws Exception {
CommandLine cmdLine = new CommandLine();
Config config = cmdLine.loadConfig(cmdLine.parser().parse(args));
LocalApplicationRunner localRunner = new LocalApplicationRunner(config);
localRunner.run(new BroadcastExample());
}
use of org.apache.samza.util.CommandLine in project samza by apache.
the class KeyValueStoreExample method main.
// local execution mode
public static void main(String[] args) throws Exception {
CommandLine cmdLine = new CommandLine();
Config config = cmdLine.loadConfig(cmdLine.parser().parse(args));
LocalApplicationRunner localRunner = new LocalApplicationRunner(config);
localRunner.run(new KeyValueStoreExample());
}
use of org.apache.samza.util.CommandLine in project samza by apache.
the class PageViewCounterExample method main.
// local execution mode
public static void main(String[] args) {
CommandLine cmdLine = new CommandLine();
Config config = cmdLine.loadConfig(cmdLine.parser().parse(args));
LocalApplicationRunner localRunner = new LocalApplicationRunner(config);
localRunner.run(new PageViewCounterExample());
}
Aggregations