use of org.apache.storm.flux.wrappers.spouts.FluxShellSpout in project storm by apache.
the class SimpleTopology method getTopology.
public StormTopology getTopology(Map<String, Object> config) {
TopologyBuilder builder = new TopologyBuilder();
// spouts
FluxShellSpout spout = new FluxShellSpout(new String[] { "node", "randomsentence.js" }, new String[] { "word" });
builder.setSpout("sentence-spout", spout, 1);
// bolts
builder.setBolt("log-bolt", new LogInfoBolt(), 1).shuffleGrouping("sentence-spout");
return builder.createTopology();
}
use of org.apache.storm.flux.wrappers.spouts.FluxShellSpout in project storm by apache.
the class SimpleTopologySource method getTopology.
@Override
public StormTopology getTopology(Map<String, Object> config) {
TopologyBuilder builder = new TopologyBuilder();
// spouts
FluxShellSpout spout = new FluxShellSpout(new String[] { "node", "randomsentence.js" }, new String[] { "word" });
builder.setSpout("sentence-spout", spout, 1);
// bolts
builder.setBolt("log-bolt", new LogInfoBolt(), 1).shuffleGrouping("sentence-spout");
return builder.createTopology();
}
use of org.apache.storm.flux.wrappers.spouts.FluxShellSpout in project storm by apache.
the class SimpleTopologyWithConfigParam method getTopology.
public StormTopology getTopology(Config config) {
TopologyBuilder builder = new TopologyBuilder();
// spouts
FluxShellSpout spout = new FluxShellSpout(new String[] { "node", "randomsentence.js" }, new String[] { "word" });
builder.setSpout("sentence-spout", spout, 1);
// bolts
builder.setBolt("log-bolt", new LogInfoBolt(), 1).shuffleGrouping("sentence-spout");
return builder.createTopology();
}
Aggregations