Search in sources :

Example 1 with ConsumerSpout

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;
}
Also used : TopologyBuilder(backtype.storm.topology.TopologyBuilder) ConsumerSpout(com.alibaba.jstorm.ons.consumer.ConsumerSpout) ProducerBolt(com.alibaba.jstorm.ons.producer.ProducerBolt)

Aggregations

TopologyBuilder (backtype.storm.topology.TopologyBuilder)1 ConsumerSpout (com.alibaba.jstorm.ons.consumer.ConsumerSpout)1 ProducerBolt (com.alibaba.jstorm.ons.producer.ProducerBolt)1