Search in sources :

Example 6 with ConstSpout

use of org.apache.storm.perf.spout.ConstSpout in project storm by apache.

the class ConstSpoutOnlyTopo method getTopology.

static StormTopology getTopology() {
    // 1 -  Setup Const Spout   --------
    ConstSpout spout = new ConstSpout("some data").withOutputFields("str");
    // 2 - Setup Topology  --------
    TopologyBuilder builder = new TopologyBuilder();
    builder.setSpout(SPOUT_ID, spout, 1);
    return builder.createTopology();
}
Also used : ConstSpout(org.apache.storm.perf.spout.ConstSpout) TopologyBuilder(org.apache.storm.topology.TopologyBuilder)

Aggregations

ConstSpout (org.apache.storm.perf.spout.ConstSpout)6 TopologyBuilder (org.apache.storm.topology.TopologyBuilder)6 DevNullBolt (org.apache.storm.perf.bolt.DevNullBolt)4 BoltDeclarer (org.apache.storm.topology.BoltDeclarer)3 IdBolt (org.apache.storm.perf.bolt.IdBolt)2