Search in sources :

Example 11 with IdentityBolt

use of org.apache.heron.integration_test.common.bolt.IdentityBolt 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 12 with IdentityBolt

use of org.apache.heron.integration_test.common.bolt.IdentityBolt 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)

Example 13 with IdentityBolt

use of org.apache.heron.integration_test.common.bolt.IdentityBolt in project heron by twitter.

the class OneSpoutTwoBolts method buildTopology.

@Override
protected TestTopologyBuilder buildTopology(TestTopologyBuilder builder) {
    builder.setSpout("ab-spout", new ABSpout(), 1);
    builder.setBolt("identity-bolt-1", new IdentityBolt(new Fields("word")), 1).shuffleGrouping("ab-spout");
    builder.setBolt("identity-bolt-2", new IdentityBolt(new Fields("word")), 1).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

Fields (org.apache.heron.api.tuple.Fields)13 IdentityBolt (org.apache.heron.integration_test.common.bolt.IdentityBolt)13 ABSpout (org.apache.heron.integration_test.common.spout.ABSpout)12 Config (org.apache.heron.api.Config)1 BasicConfig (org.apache.heron.integration_test.common.BasicConfig)1 PausedLocalFileSpout (org.apache.heron.integration_test.common.spout.PausedLocalFileSpout)1 TestTopologyBuilder (org.apache.heron.integration_test.core.TestTopologyBuilder)1