use of com.twitter.heron.eco.builder.SpoutBuilder in project incubator-heron by apache.
the class Eco method main.
public static void main(String[] args) throws Exception {
Options options = constructOptions();
CommandLineParser parser = new DefaultParser();
CommandLine cmd;
try {
cmd = parser.parse(options, args);
} catch (ParseException e) {
throw new RuntimeException("Error parsing command line options: ", e);
}
FileInputStream fin = new FileInputStream(new File(cmd.getOptionValue(ECO_CONFIG_FILE)));
String propsFile = cmd.getOptionValue(PROPS);
FileInputStream propsInputStream = null;
if (propsFile != null) {
propsInputStream = new FileInputStream(new File(propsFile));
}
Boolean filterFromEnv = cmd.hasOption(ENV_PROPS);
Eco eco = new Eco(new EcoBuilder(new SpoutBuilder(), new BoltBuilder(), new StreamBuilder(), new ComponentBuilder(), new ConfigBuilder()), new EcoParser(), new EcoSubmitter());
eco.submit(fin, propsInputStream, filterFromEnv);
}
Aggregations