use of org.openkilda.wfm.topology.islstats.bolts.IslStatsBolt in project open-kilda by telstra.
the class IslStatsTopology method createTopology.
public StormTopology createTopology() {
final String clazzName = this.getClass().getSimpleName();
final String spoutName = "islstats-spout";
logger.debug("Building Topology - {}", clazzName);
TopologyBuilder builder = new TopologyBuilder();
String topic = config.getKafkaTopoDiscoTopic();
checkAndCreateTopic(topic);
logger.debug("connecting to {} topic", topic);
builder.setSpout(spoutName, createKafkaSpout(topic, clazzName));
final String verifyIslStatsBoltName = IslStatsBolt.class.getSimpleName();
IslStatsBolt verifyIslStatsBolt = new IslStatsBolt();
logger.debug("starting {} bolt", verifyIslStatsBoltName);
builder.setBolt(verifyIslStatsBoltName, verifyIslStatsBolt, config.getParallelism()).shuffleGrouping(spoutName);
final String openTsdbTopic = config.getKafkaOtsdbTopic();
checkAndCreateTopic(openTsdbTopic);
KafkaBolt openTsdbBolt = createKafkaBolt(openTsdbTopic);
builder.setBolt("isl-stats-opentsdb", openTsdbBolt, config.getParallelism()).shuffleGrouping(verifyIslStatsBoltName);
return builder.createTopology();
}
Aggregations