Search in sources :

Example 1 with IdentityBolt

use of com.twitter.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(com.twitter.heron.integration_test.common.bolt.IdentityBolt) Fields(com.twitter.heron.api.tuple.Fields) ABSpout(com.twitter.heron.integration_test.common.spout.ABSpout)

Example 2 with IdentityBolt

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

the class NonGrouping 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).noneGrouping("ab-spout");
    return builder;
}
Also used : IdentityBolt(com.twitter.heron.integration_test.common.bolt.IdentityBolt) Fields(com.twitter.heron.api.tuple.Fields) ABSpout(com.twitter.heron.integration_test.common.spout.ABSpout)

Example 3 with IdentityBolt

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

the class OneSpoutBoltMultiTasks method buildTopology.

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

Example 4 with IdentityBolt

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

the class AllGrouping method buildTopology.

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

Example 5 with IdentityBolt

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

the class BasicTopologyOneTask method buildTopology.

@Override
protected TestTopologyBuilder buildTopology(TestTopologyBuilder 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(com.twitter.heron.integration_test.common.bolt.IdentityBolt) Fields(com.twitter.heron.api.tuple.Fields) ABSpout(com.twitter.heron.integration_test.common.spout.ABSpout)

Aggregations

Fields (com.twitter.heron.api.tuple.Fields)10 IdentityBolt (com.twitter.heron.integration_test.common.bolt.IdentityBolt)10 ABSpout (com.twitter.heron.integration_test.common.spout.ABSpout)9 Config (com.twitter.heron.api.Config)1 BasicConfig (com.twitter.heron.integration_test.common.BasicConfig)1 PausedLocalFileSpout (com.twitter.heron.integration_test.common.spout.PausedLocalFileSpout)1 TestTopologyBuilder (com.twitter.heron.integration_test.core.TestTopologyBuilder)1