Search in sources :

Example 1 with IslStatsBolt

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();
}
Also used : TopologyBuilder(org.apache.storm.topology.TopologyBuilder) IslStatsBolt(org.openkilda.wfm.topology.islstats.bolts.IslStatsBolt) KafkaBolt(org.apache.storm.kafka.bolt.KafkaBolt)

Aggregations

KafkaBolt (org.apache.storm.kafka.bolt.KafkaBolt)1 TopologyBuilder (org.apache.storm.topology.TopologyBuilder)1 IslStatsBolt (org.openkilda.wfm.topology.islstats.bolts.IslStatsBolt)1