Search in sources :

Example 11 with ABSpout

use of org.apache.heron.integration_test.common.spout.ABSpout in project heron by twitter.

the class BasicTopologyOneTask method buildTopology.

@Override
protected TopologyBuilder buildTopology(TopologyBuilder builder) {
    builder.setSpout("ab-spout", new ABSpout(true), 1);
    builder.setBolt("identity-bolt", new IdentityBolt(new Fields("word")), 3).shuffleGrouping("ab-spout");
    return builder;
}
Also used : IdentityBolt(org.apache.heron.integration_test.common.bolt.IdentityBolt) Fields(org.apache.heron.api.tuple.Fields) ABSpout(org.apache.heron.integration_test.common.spout.ABSpout)

Example 12 with ABSpout

use of org.apache.heron.integration_test.common.spout.ABSpout in project heron by twitter.

the class BasicTopologyOneTask method buildTopology.

@Override
protected TopologyBuilder buildTopology(TopologyBuilder builder) {
    builder.setSpout("ab-spout", new ABSpout(true), 1);
    builder.setBolt("identity-bolt", new IdentityBolt(new Fields("word")), 2).shuffleGrouping("ab-spout");
    return builder;
}
Also used : IdentityBolt(org.apache.heron.integration_test.common.bolt.IdentityBolt) Fields(org.apache.heron.api.tuple.Fields) ABSpout(org.apache.heron.integration_test.common.spout.ABSpout)

Example 13 with ABSpout

use of org.apache.heron.integration_test.common.spout.ABSpout in project heron by twitter.

the class FieldsGrouping method buildTopology.

@Override
protected TopologyBuilder buildTopology(TopologyBuilder builder) {
    builder.setSpout("ab-spout", new ABSpout(), 1);
    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(org.apache.heron.api.tuple.Fields) CountAggregatorBolt(org.apache.heron.integration_test.common.bolt.CountAggregatorBolt) ABSpout(org.apache.heron.integration_test.common.spout.ABSpout) WordCountBolt(org.apache.heron.integration_test.common.bolt.WordCountBolt)

Example 14 with ABSpout

use of org.apache.heron.integration_test.common.spout.ABSpout in project heron by twitter.

the class MultiSpoutsMultiTasks method buildTopology.

@Override
protected TestTopologyBuilder buildTopology(TestTopologyBuilder builder) {
    builder.setSpout("ab-spout-1", new ABSpout(), 3);
    builder.setSpout("ab-spout-2", new ABSpout(), 3);
    builder.setBolt("identity-bolt", new IdentityBolt(new Fields("word")), 1).shuffleGrouping("ab-spout-1").shuffleGrouping("ab-spout-2");
    return builder;
}
Also used : IdentityBolt(org.apache.heron.integration_test.common.bolt.IdentityBolt) Fields(org.apache.heron.api.tuple.Fields) ABSpout(org.apache.heron.integration_test.common.spout.ABSpout)

Example 15 with ABSpout

use of org.apache.heron.integration_test.common.spout.ABSpout in project heron by twitter.

the class OneBoltMultiTasks method buildTopology.

@Override
protected TestTopologyBuilder buildTopology(TestTopologyBuilder builder) {
    builder.setSpout("ab-spout", new ABSpout(), 1);
    builder.setBolt("identity-bolt", new IdentityBolt(new Fields("word")), 3).shuffleGrouping("ab-spout");
    return builder;
}
Also used : IdentityBolt(org.apache.heron.integration_test.common.bolt.IdentityBolt) Fields(org.apache.heron.api.tuple.Fields) ABSpout(org.apache.heron.integration_test.common.spout.ABSpout)

Aggregations

ABSpout (org.apache.heron.integration_test.common.spout.ABSpout)16 Fields (org.apache.heron.api.tuple.Fields)15 IdentityBolt (org.apache.heron.integration_test.common.bolt.IdentityBolt)12 WordCountBolt (org.apache.heron.integration_test.common.bolt.WordCountBolt)3 CountAggregatorBolt (org.apache.heron.integration_test.common.bolt.CountAggregatorBolt)2 DoubleTuplesBolt (org.apache.heron.integration_test.common.bolt.DoubleTuplesBolt)1