use of com.alibaba.jstorm.ons.consumer.ConsumerSpout 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.producer.parallel"), 1);
int spoutParallel = JStormUtils.parseInt(conf.get("topology.consumer.parallel"), 1);
builder.setSpout("OnsConsumer", new ConsumerSpout(), spoutParallel);
builder.setBolt("OnsProducer", new ProducerBolt(), writerParallel).localFirstGrouping("OnsConsumer");
return builder;
}
Aggregations