Search in sources :

Example 6 with Fields

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

the class IntegrationTestBolt method declareOutputFields.

@Override
public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {
    outputFieldsDeclarer.declareStream(Constants.INTEGRATION_TEST_CONTROL_STREAM_ID, new Fields(Constants.INTEGRATION_TEST_TERMINAL));
    delegateBolt.declareOutputFields(outputFieldsDeclarer);
}
Also used : Fields(com.twitter.heron.api.tuple.Fields)

Example 7 with Fields

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

the class IntegrationTestSpout method declareOutputFields.

@Override
public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {
    outputFieldsDeclarer.declareStream(Constants.INTEGRATION_TEST_CONTROL_STREAM_ID, new Fields(Constants.INTEGRATION_TEST_TERMINAL));
    delegateSpout.declareOutputFields(outputFieldsDeclarer);
}
Also used : Fields(com.twitter.heron.api.tuple.Fields)

Example 8 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 9 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 10 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)

Aggregations

Fields (com.twitter.heron.api.tuple.Fields)17 ABSpout (com.twitter.heron.integration_test.common.spout.ABSpout)11 IdentityBolt (com.twitter.heron.integration_test.common.bolt.IdentityBolt)10 Config (com.twitter.heron.api.Config)2 BaseBasicBolt (com.twitter.heron.api.bolt.BaseBasicBolt)2 BasicOutputCollector (com.twitter.heron.api.bolt.BasicOutputCollector)2 BaseRichSpout (com.twitter.heron.api.spout.BaseRichSpout)2 SpoutOutputCollector (com.twitter.heron.api.spout.SpoutOutputCollector)2 OutputFieldsDeclarer (com.twitter.heron.api.topology.OutputFieldsDeclarer)2 TopologyBuilder (com.twitter.heron.api.topology.TopologyBuilder)2 TopologyContext (com.twitter.heron.api.topology.TopologyContext)2 Tuple (com.twitter.heron.api.tuple.Tuple)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 HeronTopology (com.twitter.heron.api.HeronTopology)1 TopologyAPI (com.twitter.heron.api.generated.TopologyAPI)1 BoltDeclarer (com.twitter.heron.api.topology.BoltDeclarer)1 BasicConfig (com.twitter.heron.integration_test.common.BasicConfig)1 CountAggregatorBolt (com.twitter.heron.integration_test.common.bolt.CountAggregatorBolt)1 DoubleTuplesBolt (com.twitter.heron.integration_test.common.bolt.DoubleTuplesBolt)1