Search in sources :

Example 6 with HeronTopology

use of org.apache.heron.api.HeronTopology in project heron by twitter.

the class HeronExecutorTaskTest method createTestTopology.

Topology createTestTopology(String name) {
    TopologyBuilder builder = new TopologyBuilder();
    builder.setSpout("spout-1", new TestSpout(), 2);
    builder.setBolt("bolt-1", new TestBolt(), 1).shuffleGrouping("spout-1");
    HeronTopology topology = builder.createTopology();
    org.apache.heron.api.Config config = new org.apache.heron.api.Config();
    return topology.setName(name).setConfig(config).setState(TopologyState.RUNNING).getTopology();
}
Also used : TopologyBuilder(org.apache.heron.api.topology.TopologyBuilder) HeronTopology(org.apache.heron.api.HeronTopology)

Aggregations

HeronTopology (org.apache.heron.api.HeronTopology)6 Config (org.apache.heron.api.Config)3 TopologyBuilder (org.apache.heron.api.topology.TopologyBuilder)3 BaseBasicBolt (org.apache.heron.api.bolt.BaseBasicBolt)2 BasicOutputCollector (org.apache.heron.api.bolt.BasicOutputCollector)2 BaseRichSpout (org.apache.heron.api.spout.BaseRichSpout)2 SpoutOutputCollector (org.apache.heron.api.spout.SpoutOutputCollector)2 OutputFieldsDeclarer (org.apache.heron.api.topology.OutputFieldsDeclarer)2 TopologyContext (org.apache.heron.api.topology.TopologyContext)2 Tuple (org.apache.heron.api.tuple.Tuple)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 IRichBolt (org.apache.heron.api.bolt.IRichBolt)1 IStatefulWindowedBolt (org.apache.heron.api.bolt.IStatefulWindowedBolt)1 IWindowedBolt (org.apache.heron.api.bolt.IWindowedBolt)1 TopologyAPI (org.apache.heron.api.generated.TopologyAPI)1 IRichSpout (org.apache.heron.api.spout.IRichSpout)1 BoltDeclarer (org.apache.heron.api.topology.BoltDeclarer)1