use of com.alibaba.aloha.meta.MetaSpout in project jstorm by alibaba.
the class TestTridentTopology method buildTopology.
public static StormTopology buildTopology() {
TridentTopology topology = new TridentTopology();
topology.newStream("MetaSpout", new MetaSpout()).each(new Fields("MetaTuple"), new MsgPrint(), new Fields());
return topology.build();
}
use of com.alibaba.aloha.meta.MetaSpout in project jstorm by alibaba.
the class TestTopology method setupBuilder.
private static TopologyBuilder setupBuilder() throws Exception {
TopologyBuilder builder = new TopologyBuilder();
int writerParallel = JStormUtils.parseInt(conf.get("topology.writer.parallel"), 1);
int spoutParallel = JStormUtils.parseInt(conf.get("topology.spout.parallel"), 1);
builder.setSpout("MetaSpout", new MetaSpout(), spoutParallel);
builder.setBolt(WRITER_COMPONENT, new WriterBolt(), writerParallel).shuffleGrouping("MetaSpout");
return builder;
}
Aggregations