Search in sources :

Example 21 with Fields

use of com.twitter.heron.api.tuple.Fields 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)

Example 22 with Fields

use of com.twitter.heron.api.tuple.Fields in project heron by twitter.

the class BoltDoubleEmitTuples method buildTopology.

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

Example 23 with Fields

use of com.twitter.heron.api.tuple.Fields 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 24 with Fields

use of com.twitter.heron.api.tuple.Fields 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(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 25 with Fields

use of com.twitter.heron.api.tuple.Fields in project heron by twitter.

the class OneSpoutMultiTasks method buildTopology.

@Override
protected TestTopologyBuilder buildTopology(TestTopologyBuilder builder) {
    builder.setSpout("ab-spout", new ABSpout(), 3);
    builder.setBolt("identity-bolt", new IdentityBolt(new Fields("word")), 1).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)50 ABSpout (com.twitter.heron.integration_test.common.spout.ABSpout)22 IdentityBolt (com.twitter.heron.integration_test.common.bolt.IdentityBolt)20 Config (com.twitter.heron.api.Config)13 TopologyBuilder (com.twitter.heron.api.topology.TopologyBuilder)13 Tuple (com.twitter.heron.api.tuple.Tuple)8 TopologyArgParser (com.github.ashvina.common.TopologyArgParser)5 TopologyAPI (com.twitter.heron.api.generated.TopologyAPI)5 TopologyContext (com.twitter.heron.api.topology.TopologyContext)5 Values (com.twitter.heron.api.tuple.Values)5 HashMap (java.util.HashMap)5 BaseBasicBolt (com.twitter.heron.api.bolt.BaseBasicBolt)4 BasicOutputCollector (com.twitter.heron.api.bolt.BasicOutputCollector)4 BaseRichSpout (com.twitter.heron.api.spout.BaseRichSpout)4 SpoutOutputCollector (com.twitter.heron.api.spout.SpoutOutputCollector)4 OutputFieldsDeclarer (com.twitter.heron.api.topology.OutputFieldsDeclarer)4 TupleWindow (com.twitter.heron.api.windowing.TupleWindow)4 Map (java.util.Map)4 TupleWindowImpl (com.twitter.heron.api.windowing.TupleWindowImpl)3 ArrayList (java.util.ArrayList)3