public class ApplicationRunners
extends java.lang.Object
ApplicationRunner
instances based on configuration and user-implemented SamzaApplication
This class is usually used in main() function to create an instance of ApplicationRunner
, as in the example
below:
public static void main(String[] args) {
CommandLine cmdLine = new CommandLine();
Config config = cmdLine.loadConfig(cmdLine.parser().parse(args));
PageViewCounter app = new PageViewCounter();
ApplicationRunner runner = ApplicationRunners.getApplicationRunner(app, config);
runner.run();
runner.waitForFinish();
}
Modifier and Type | Method and Description |
---|---|
static ApplicationRunner |
getApplicationRunner(SamzaApplication userApp,
Config config)
Get the
ApplicationRunner that runs the userApp |
public static final ApplicationRunner getApplicationRunner(SamzaApplication userApp, Config config)
ApplicationRunner
that runs the userApp
userApp
- the user application objectconfig
- the configuration for this applicationApplicationRunner
object that will run the userApp