Search in sources :

Example 1 with WordCountBolt

use of com.twitter.heron.integration_test.common.bolt.WordCountBolt in project heron by twitter.

the class FieldsGrouping method buildTopology.

@Override
protected TestTopologyBuilder buildTopology(TestTopologyBuilder builder) {
    builder.setSpout("ab-spout", new ABSpout(), 1, 400);
    builder.setBolt("count-bolt", new WordCountBolt(), 2).fieldsGrouping("ab-spout", new Fields("word"));
    builder.setBolt("sum-bolt", new CountAggregatorBolt(), 1).noneGrouping("count-bolt");
    return builder;
}
Also used : Fields(com.twitter.heron.api.tuple.Fields) CountAggregatorBolt(com.twitter.heron.integration_test.common.bolt.CountAggregatorBolt) ABSpout(com.twitter.heron.integration_test.common.spout.ABSpout) WordCountBolt(com.twitter.heron.integration_test.common.bolt.WordCountBolt)

Example 2 with WordCountBolt

use of com.twitter.heron.integration_test.common.bolt.WordCountBolt in project heron by twitter.

the class GlobalGrouping method buildTopology.

@Override
protected TestTopologyBuilder buildTopology(TestTopologyBuilder builder) {
    builder.setSpout("ab-spout", new ABSpout(), 1);
    builder.setBolt("count-bolt", new WordCountBolt(), 3).globalGrouping("ab-spout");
    return builder;
}
Also used : ABSpout(com.twitter.heron.integration_test.common.spout.ABSpout) WordCountBolt(com.twitter.heron.integration_test.common.bolt.WordCountBolt)

Aggregations

WordCountBolt (com.twitter.heron.integration_test.common.bolt.WordCountBolt)2 ABSpout (com.twitter.heron.integration_test.common.spout.ABSpout)2 Fields (com.twitter.heron.api.tuple.Fields)1 CountAggregatorBolt (com.twitter.heron.integration_test.common.bolt.CountAggregatorBolt)1