use of backtype.storm.topology.TopologyBuilder in project jstorm by alibaba.
the class BatchMetaTopology method SetRemoteTopology.
public static void SetRemoteTopology() throws AlreadyAliveException, InvalidTopologyException, TopologyAssignException {
TopologyBuilder builder = SetBuilder();
StormSubmitter.submitTopology(topologyName, conf, builder.createTopology());
}
use of backtype.storm.topology.TopologyBuilder in project jstorm by alibaba.
the class BatchMetaTopology method SetLocalTopology.
public static void SetLocalTopology() throws Exception {
TopologyBuilder builder = SetBuilder();
LocalCluster cluster = new LocalCluster();
cluster.submitTopology(topologyName, conf, builder.createTopology());
Thread.sleep(600000);
cluster.shutdown();
}
use of backtype.storm.topology.TopologyBuilder in project jstorm by alibaba.
the class TestTopology method main.
public static void main(String[] args) throws Exception {
if (args.length == 0) {
System.err.println("Please input configuration file");
System.exit(-1);
}
LoadConf(args[0]);
TopologyBuilder builder = setupBuilder();
submitTopology(builder);
}
use of backtype.storm.topology.TopologyBuilder in project jstorm by alibaba.
the class TestTopology method setupBuilder.
private static TopologyBuilder setupBuilder() throws Exception {
TopologyBuilder builder = new TopologyBuilder();
int writerParallel = JStormUtils.parseInt(conf.get("topology.writer.parallel"), 1);
int spoutParallel = JStormUtils.parseInt(conf.get("topology.spout.parallel"), 1);
builder.setSpout("MetaSpout", new MetaSpout(), spoutParallel);
builder.setBolt(WRITER_COMPONENT, new WriterBolt(), writerParallel).shuffleGrouping("MetaSpout");
return builder;
}
use of backtype.storm.topology.TopologyBuilder in project jstorm by alibaba.
the class TestTopology method main.
public static void main(String[] args) throws Exception {
if (args.length == 0) {
System.err.println("Please input configuration file");
System.exit(-1);
}
conf = LoadConfig.LoadConf(args[0]);
TopologyBuilder builder = setupBuilder();
submitTopology(builder);
}
Aggregations